Please visit our sponsor
UNKNOWN
'**************************************
'Windows API/Global Declarations for :Cl
'     ose/open the CD Rom door
'**************************************
'for 16 bit windows
Declare Function mcisendstring Lib "MMSystem" (ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal wReturnLength As Integer, ByVal hCallback As Integer) As Long
    'Note:FOR 95/98/NT using the following:
Public 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
'**************************************
' Name: Close/open the CD Rom door
' Description:Open and close the CD rom 
'     door from code! Note:comment out the unn
    '     eeded api declaration (16 or 32 bit) dep
    '     ending on what operating system you are 
    '     using!
' By: Visual Basic On Line User Group
'
'
' Inputs:None
'
' Returns:None
'
'Assumes:None
'
'Side Effects:None
'This code is copyrighted and has limite
'     d warranties.
'Please see http://www.Planet-Source-Cod
'     e.com/xq/ASP/txtCodeId.432/lngWId.1/qx/v
'     b/scripts/ShowCode.htm
'for details.
'**************************************
'to open it:
x= 
mciSendString("set cd door open", 0&, 
0, 0)
'to close it:
x = mciSendString("set 
cd door closed", 0&, 0, 0)