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
Public Sub SetCDState(pbState As Boolean)
If pbState Then
Call mciSendString("Set CDAudio Door Open", 0&, 0&, 0&)
Else
Call mciSendString("Set CDAudio Door Closed", 0&, 0&, 0&)
End If
End Sub
[COLOR=green]' Open CD tray with Command Button[/COLOR]
Private Sub cmdClose_Click()
Call SetCDState(False)
End Sub
[COLOR=green]' Close CD tray with Command Button[/COLOR]
Private Sub cmdOpen_Click()
Call SetCDState(True)
End Sub
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
Public Function SetCDState(pbState As Boolean)
If pbState Then
Call mciSendString("Set CDAudio Door Open", 0&, 0&, 0&)
Else
Call mciSendString("Set CDAudio Door Closed", 0&, 0&, 0&)
End If
End Function
' Close CD tray with Command Button
Public Function cmdClose_Click()
Call SetCDState(False)
End Function
' Open CD tray with Command Button
Public Function cmdOpen_Click()
Call SetCDState(True)
End Function
chewy said:does anyone know where I can get a comprhensive list of api calls. I would love to get a list and mess around with them.