|
-
Nov 15th, 2000, 01:03 PM
#1
Thread Starter
Lively Member
How do I open the cdrom? I mean ejecting it...
To VB or not to VB, that's the question...
-
Nov 15th, 2000, 01:13 PM
#2
transcendental analytic
Code:
'in declarations
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
'to use
mciSendString "set CDAudio door open", 0&, 127&, 0& 'ejects
mciSendString "set CDAudio door closed", 0&, 127&, 0& 'shuts up
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Nov 15th, 2000, 01:13 PM
#3
Member
CD ROM EJECT
There are other ways but this is an easy one.
_______________________________________
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()
retvalue = mciSendString("set CDAudio door open", _
returnstring, 127, 0)
lblSTATUS.Caption = "Cd Drive is Open"
End Sub
Private Sub CmdCLOSE_Click()
retvalue = mciSendString("set CDAudio door closed", _
returnstring, 127, 0)
lblSTATUS.Caption = "Cd Drive is Closed"
End Sub
_______________________________________
-Smell Ya Later
-
Nov 15th, 2000, 01:24 PM
#4
Thread Starter
Lively Member
To VB or not to VB, that's the question...
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
|