procedure TForm1.Button1Click(Sender: TObject); var Time: DWORD; begin Time := GetTickCount; mciSendString('Set cdaudio Door Closed Wait', nil, 0, handle); ShowMessage(IntToStr(GetTickCount - Time)); Time := GetTickCount; mciSendString('Set cdaudio Door Open Wait', nil, 0, handle); ShowMessage(IntToStr(GetTickCount - Time)); end;