Open And Close CD Drives
Open And Close CD Drives
API Declarations
Add This In A Module:
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
Rate Open And Close CD Drives
(1(1 Vote))
Dim lngReturn As Long
Dim strReturn As Long
'To open the CD door, use this code:
lngReturn = mciSendString("set CDAudio door open", strReturn, 127, 0)
End Sub
Private Sub Command2_Click()
Dim lngReturn As Long
Dim strReturn As Long
'To close the CD door, use this code:
lngReturn = mciSendString("set CDAudio door closed", strReturn, 127, 0)
End Sub
Open And Close CD Drives Comments
No comments yet — be the first to post one!
Post a Comment