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—

Satu Tanggapan

  1. thanks scriptnya

Tinggalkan Balasan

Fill in your details below or click an icon to log in:

WordPress.com Logo

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

Twitter picture

You are commenting using your Twitter account. Log Out / Ubah )

Facebook photo

You are commenting using your Facebook account. Log Out / Ubah )

Connecting to %s

Ikuti

Get every new post delivered to your Inbox.