Contoh project visual basic 6.0

dalam kesempatan kali ini. saya akan membagi trik untuk menambahkan efek suara pada saat kita mengetikkan karakter di dalam textbox.
baiklah langsung saja :

1. buka vb 6.0

2. pilih standard exe

3. tambahkan

2 buah textbox

3 buah command button

1 buah timer

3 buah label.

masukkan baris code berikut ini :

Private Sub Command1_Click()
PlayWaveSoundOkExit_Click
End
End Sub

Private Sub Command2_Click()
PlayWaveSoundAyam_Click
End Sub

Private Sub Command3_Click()
StopTheSoundNOW = sndPlaySound(soundfile$, wFlags%)
End Sub

Private Sub Command4_Click()
PlayWaveSoundOkExit_Click
Timer1.Enabled = False
Command2.Visible = True
Command3.Visible = True
Command4.Visible = False
Command1.Visible = True
End Sub

Private Sub Form_Load()
PlayWaveSoundIntro_Click
MsgBox “Sound Wav Intro telah berbunyi, selanjutnya Sound Wav saat menekan Ok”, vbOKOnly, “Info”
PlayWaveSoundOkExit_Click
End Sub

Private Sub Text1_Change()
PlayWaveSoundLblTxt_Click
End Sub

Private Sub Text2_Change()
PlayWaveSoundLblTxt_Click
End Sub

Private Sub Timer1_Timer()
If Not Text1.Text = “” And Not Text2.Text = “” Then
Command4.Visible = True
Else
Command4.Visible = False
End If
If Label3.ForeColor = &HFFFFFF Then
Label3.ForeColor = &H80000008
Else
Label3.ForeColor = &HFFFFFF
End If
End Sub

setelah selesei. tambahkan sebuah module. ketiikan code berikut ini : atw langsung copy-paste juga gpp. heheheheh

Private Sub Command1_Click()
PlayWaveSoundOkExit_Click
End
End Sub

Private Sub Command2_Click()
PlayWaveSoundAyam_Click
End Sub

Private Sub Command3_Click()
StopTheSoundNOW = sndPlaySound(soundfile$, wFlags%)
End Sub

Private Sub Command4_Click()
PlayWaveSoundOkExit_Click
Timer1.Enabled = False
Command2.Visible = True
Command3.Visible = True
Command4.Visible = False
Command1.Visible = True
End Sub

Private Sub Form_Load()
PlayWaveSoundIntro_Click
MsgBox “Sound Wav Intro telah berbunyi, selanjutnya Sound Wav saat menekan Ok”, vbOKOnly, “Info”
PlayWaveSoundOkExit_Click
End Sub

Private Sub Text1_Change()
PlayWaveSoundLblTxt_Click
End Sub

Private Sub Text2_Change()
PlayWaveSoundLblTxt_Click
End Sub

Private Sub Timer1_Timer()
If Not Text1.Text = “” And Not Text2.Text = “” Then
Command4.Visible = True
Else
Command4.Visible = False
End If
If Label3.ForeColor = &HFFFFFF Then
Label3.ForeColor = &H80000008
Else
Label3.ForeColor = &HFFFFFF
End If
End Sub

jika masih bingung ini ada source code nya. silahkan di donlot.

Leave a Reply

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 / Change )

Twitter picture

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

Facebook photo

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

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s