Find Code:
All Words
Any of the Words
Exact Phrase
Home
:
Code
:
Forums
:
Submit
:
Mailing List
:
About
:
Contact
Code
All
VB.NET
ASP.NET
C#
VB Classic
ASP Classic
Snippets
Popular
Resources
Submit Code
Forums
Articles
Tips
Links
Books
Contest
Link to us
Demonstrates how to open and close the CD ROM door...
Author:
Cheri Haines
Submitted:
3/26/2000
Version:
VB5
Compatibility:
VB5, VB6
Category:
Windows API
Views:
11257
Demonstrates how to open and close the CD ROM door once a command button is pressed.
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
Code:
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
Home
|
Forums
|
Submit
|
Books
|
Mailing List
|
Advertising
|
About
|
Contact
© 2024 A1VBCode. All rights reserved.
Legal disclaimer & terms of use
Privacy statement