Source Code VB 6.0 Open-Close CDrom


source code VB 6.0 untuk buka dan tutup cdrom

  • Buat command button di form
  • copy paste source code di bawah ke form yang sudah dibuat

‘—copy here—

‘CopyRight by x-vb@jhie
http://www.vbbego.cjb.net
‘Penulis: x-vb@jhie – 7/19/2004

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

Private Sub Command1_Click()
If Command1.Caption = “&Open CD-Room” Then
retvalue = mciSendString(“set CDAudio door open”, _
returnstring, 127, 0)
Command1.Caption = “&Close CD-Room”
Else
retvalue = mciSendString(“set CDAudio door Closed”, _
returnstring, 127, 0)
Command1.Caption = “&Open CD-Room”
End If
End Sub

—Selemat Mencoba—

Iklan

Satu pemikiran pada “Source Code VB 6.0 Open-Close CDrom

Tinggalkan Balasan

Please log in using one of these methods to post your comment:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s