Ketik kode berikut di General Declaration
Option Explicit
Dim hasil
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
ketik kode berikut di form load
hasil = mciSendString("close all", 0, 0, hWnd)
hasil = mciSendString("open cdaudio alias cd wait shareable", 0, 0, hWnd)
Buat tombol untuk buka dvd drive, ketik kode berikut :
hasil = mciSendString("set cd door open", 0, 0, hWnd)
Buat tombol untuk tutup dvd drive, ketik kode berikut
hasil = mciSendString("set cd door closed", 0, 0, hWnd)
Selesai.
Project silahkan download disini http://www.4shared.com/archive/R-aDsToF/cd-drive2.html