If you want to turn your CD-ROM via VB, you can send a related command request to Windows MultiMedia DLL, but you must first declare the DLL:
Add the following code in the module file:
Declare function mcIndstring lib "winmm.dll" alias _ "mciSendstringa" (byval lpstringa "(byval _lpstrreetstring as string, byval ureturnLENGTH AS long, _
BYVAL HWNDCALLBACK AS Long AS Long
The following is the process code to open the CD-ROM:
RetValue = McIndstring ("Set CDAUDIO DOOR OPEN", _
ReturnString, 127, 0)
Turn off the CD-ROM with the following code:
RetValue = McISendstring ("Set Cdaudio Door Closed", _Returnstring, 127, 0)