CD-ROM Laufwerk öffnen oder schließen
[Windows 95/98/NT/2000]

28.10.1999


Wie von Geisterhand können Sie Ihr CD-ROM Laufwerk öffnen
    oder schließen lassen:

ERFORDERLICHE OBJEKTE
   2 Commandbuttons (Command1, Command2)

 FORM-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
   Private Sub Command1_Click()
      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
   Private Sub Form_Load()
      Command1.Caption = "Öffnen"
      Command2.Caption = "Schließen"
   End Sub
 

Download - 2 KB