Results 1 to 3 of 3

Thread: how can i open cd rom in vb

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2001
    Posts
    3

    Arrow

    i need the line code to open cd rom in vb


    thank you !!!!!

  2. #2
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390
    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
    'Open it
    retvalue = mcisendstring("set CDAudio door open", returnstring, 127, 0) 
    'Close it
    retvalue = mcisendstring("set CDAudio door closed", returnstring, 127, 0)
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  3. #3
    Guest
    you don't really need to pass the 3rd argument as 127. Leaving it blank will work as well.
    Code:
    retVal = mciSendString("set CDAudio door open", returnstring, 0, 0)

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