Posted on August 3, 2011
1
2
3
4
5
6
7
8
9
10
11
12
| 'System & API - How to open and close the CD ROM door once a command button is pressed
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()
retvalue = mciSendString("set CD Audio door open", returnstring, 127, 0)
End Sub
Private Sub Command2_Click()
retvalue = mciSendString("set CD Audio door closed", returnstring, 127, 0)
End Sub |