Project 1 : Program PembuKa CD-ROM Otomatis
Program ini dapat digunakan untuk mengatasi cd-rom yang mungkin terkadang sulit untuk membuka pintu cd-romnya. Program dibuat dengan menggunakan Visual Basic 6 dan hanya menggunakan 2 Control Button.
Tapilan Program
Download Program :
Source Code Program :
Option Explicit
Private Declare Function mciSendString Lib _
"winmm.dll" Alias "mciSendStringA" (ByVal _
lpCommandString As String, ByVal lpReturnString _
As String, ByVal uReturnLength As Long, _
ByVal hwndCallback As Long) As Long
Private Sub Command1_Click()
On Error Resume Next
Call mciSendString("set CDAudio door open", "", 0, 0)
End Sub
Private Sub Command2_Click()
On Error Resume Next
Call mciSendString("set CDAudio door closed", "", 0, 0)
End Sub
Private Sub Command1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Command1.BackColor = vbBlue
End Sub
Private Sub Command2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Command2.BackColor = vbRed
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Command1.BackColor = vbWhite
Command2.BackColor = vbWhite
End Sub