Hi,
Cd door open and close program code in visual basic.
Start to Visual Studio 2012 for Visual Basic. New Project.
Let’s start,
İnsert to 2 button in form1
And paste this code;
---------------------------------------------------------------------------
Public Class Form1
Private Declare Function mciExecute Lib "winmm.dll" (ByVal lpstrCommand As String) As Long
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
mciExecute("Set CDAudio door Open")
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
mciExecute("Set CDAudio door Closed")
End Sub
End Class
------------------------------------------------------------------------------
No comments:
Post a Comment