|
-
Aug 14th, 2000, 08:37 PM
#1
Thread Starter
Junior Member
Hey
I want my cd-rom to open. I found this code but it doesn't work!
Option Explicit
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 cmdDoWhat_Click(Index As Integer)
Dim Ret As Long
Dim RetStr As String
Select Case Index
Case Is = 0: Ret = MCISendString("set CDAudio door open", RetStr, 127, 0)
Case Is = 1: Ret = MCISendString("set CDAudio door closed", RetStr, 127, 0)
End Select
End Sub
Always let the Wookiee Win!
-
Aug 14th, 2000, 08:54 PM
#2
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 cmdClose_Click()
retvalue = mciSendString("set CDAudio door closed", _
returnstring, 127, 0)
End Sub
Private Sub cmdOpen_Click()
retvalue = mciSendString("set CDAudio door open", _
returnstring, 127, 0)
End Sub
-
Aug 14th, 2000, 09:08 PM
#3
Thread Starter
Junior Member
Thanks
Always let the Wookiee Win!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|