VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



This programme is to open and close your CD Roms tray You dont have to touch your cd roms controls

by Rhythm Shahrair (1 Submission)
Category: Windows System Services
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sun 14th September 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)

This programme is to open and close your CD Roms tray You dont have to touch your cd roms controls

Rate This programme is to open and close your CD Roms tray You dont have to touch your cd roms controls





'Command for closing CD tray
Private Sub Command1_Click()
Dim lRet As Long
lRet = mciSendString("set cdaudio door closed", returnstring, 127, 0)
Form1.Caption = "CD Tray Closed"
End Sub

'Command for opening CD tray
Private Sub Command2_Click()
Dim lRet As Long
lRet = mciSendString("set cdaudio door open", returnstring, 127, 0)
Form1.Caption = "CD Tray Opened"
End Sub


'Cheak
Private Sub Form_Load()
If lRet = mciSendString("set cdaudio door closed", returnstring, 127, 0) Then
Form1.Caption = "CD Tray Closed"
ElseIf lRet = mciSendString("set cdaudio door Open", returnstring, 127, 0) Then
Form1.Caption = "CD Tray Open"
End If


End Sub



Download this snippet    Add to My Saved Code

This programme is to open and close your CD Roms tray You dont have to touch your cd roms controls Comments

No comments have been posted about This programme is to open and close your CD Roms tray You dont have to touch your cd roms controls. Why not be the first to post a comment about This programme is to open and close your CD Roms tray You dont have to touch your cd roms controls.

Post your comment

Subject:
Message:
0/1000 characters