Results 1 to 2 of 2

Thread: VB - open & close CD door

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2002
    Location
    top of the mountain
    Posts
    234

    VB - open & close CD door

    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

    Dim retvalue As Long
    Dim ReturnString As String
    Private Sub Command1_Click()
    ReturnString = "0&"
    retvalue = mciSendString("set CDAudio door open", ReturnString, 127, 0)
    End Sub
    Private Sub Command2_Click()
    retvalue = mciSendString("set CDAudio door closed", ReturnString, 127, 0)
    End Sub

    regards

  2. #2
    Hyperactive Member BrandonTurner's Avatar
    Join Date
    Sep 2001
    Location
    East Lansing, Michiagn
    Posts
    268
    VB Code:
    1. Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" _
    2. (ByVal lpstrCommand As String, ByVal lpstrReturnString As String, _
    3. ByVal uReturnLength As Long, ByVal hwndCallback As Long) As Long
    4.  
    5. Dim retvalue As Long
    6. Dim ReturnString As String
    7. Private Sub Command1_Click()
    8. ReturnString = "0&"
    9. retvalue = mciSendString("set CDAudio door open", ReturnString, 127, 0)
    10. End Sub
    11. Private Sub Command2_Click()
    12. retvalue = mciSendString("set CDAudio door closed", ReturnString, 127, 0)
    13. End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width