Searching...
8:19 PM

CD Rom Open/Close VB6

This function can control CD Rom door.
Code:
Private Declare Function mciExecute Lib "winmm.dll" (ByVal lpstrCommand As String) As Long

Public Function funcdrom(open As Integer)
 On Error Resume Next
 
    Select Case open
        Case "0"
            mciExecute ("set cdaudio door open")
        Case "1"
            mciExecute ("set cdaudio door closed")
    End Select
End Function

0 comments:

Post a Comment

 
Back to top!