Test CD-ROM disku

Postup:
Do projektu p°idejte referenci na Microsoft Scripting Runtime. Na formulß° p°idejte tlaΦφtko a na jeho udßlost Click zapiÜte:

Private Sub Command1_Click()

   Dim fso As FileSystemObject, d As Object, e As Drives, i As Byte
   
   Set fso = CreateObject("Scripting.FileSystemObject")
   Set e = fso.Drives

   For Each d In e
      If d.DriveType = 4 Then
         If d.isready = True Then
            MsgBox "V CD-Rom mechanice " & d.DriveLetter & ":  je vlo₧en disk."
         Else
            MsgBox "V CD-Rom mechanice " & d.DriveLetter & ": nenφ vlo₧en disk."
         End If
      End If
   Next

End Sub

Zp∞t

Autor: The Bozena