|
-
Jul 1st, 2000, 09:16 AM
#1
Thread Starter
Member
i want the code to eject a cd rom and then code to make the tray go back in to the computer.
thanks
I Use Visual Basic 5.0 Enterprise Edition SP3
-
Jul 1st, 2000, 09:29 AM
#2
Make a Form with 2 CommandButtons. Call them cmdOpen and cmdClose.
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 cmdOpen_Click()
' Open the CD Drive
mciSendString "set CDAudio door open", t, 127, 0
End Sub
Private Sub cmdClose_Click()
' Close the CD Drive
mciSendString "set CDAudio door closed", t, 127, 0
End Sub
-
Jul 23rd, 2000, 10:56 PM
#3
Thread Starter
Member
two cd-roms?
i got two cd-roms in my computer. how can i get it to eject the other one? (it only eject the d
I Use Visual Basic 5.0 Enterprise Edition SP3
-
Nov 17th, 2000, 03:28 AM
#4
New Member
Re: two cd-roms?
I have the same problem have you found a code sample ??
-
Nov 17th, 2000, 07:56 AM
#5
Member
Can someone post some code on how to check if the CD tray is open or closed.
Rabin
Windows : Visual Basic 6 Enterprise / 3.0 (16-bit)
DOS : QBasic 4.5 , Visual Basic For DOS
Web : HTML , VBScript , PHP (Learning)
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
|