Use DOOR CLOSED in the Command String, if it's not Open it just won't do anything, eg.
------------------Code:Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal uReturnLength As Long, ByVal hwndCallback As Long) As Long Private Sub Command1_Click() Static bOpen As Boolean If Not bOpen Then Call mciSendString("SET cdaudio DOOR OPEN wait", "", 0, 0) Else Call mciSendString("SET cdaudio DOOR CLOSED wait", "", 0, 0) End If bOpen = Not bOpen End Sub
Aaron Young
Analyst Programmer
[email protected]
[email protected]




Reply With Quote