Oppure

Loading
19/10/08 13:22
fabi3194
Come si fa a far espellere il vano cd e a farlo rientrare in vb.net?
aaa
19/10/08 18:06
ruggy94
Apparte il fatto che il cassetto del cd non lo "espelli"...casomai espelli il cd XD comunque
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

Dim Strmssg, Strdriveletter As String
Dim ReturnValue As Long
Strdriveletter = "d:\"
ReturnValue = mciSendString("open " & Strdriveletter & _
" Type cdaudio Alias cd", Strmssg, 255, 0)
ReturnValue = mciSendString("set cd door open", _
vbNullString, 0, 0)
aaa
20/10/08 19:55
fabi3194
E per chiuderlo?Avevo provato così:
        Dim Strmssg, Strdriveletter As String
        Dim ReturnValue As Long
        Strdriveletter = "d:\"
        ReturnValue = mciSendString("Open " & Strdriveletter & _
        " Type cdaudio Alias cd", Strmssg, 255, 0)
        ReturnValue = mciSendString("Set cd door Close", _
        vbNullString, 0, 0)

ma non va :rotfl::rotfl::rotfl:
aaa
21/10/08 10:07
ruggy94
ReturnValue = mciSendString("close cd", 0&, 0, 0)
aaa