Membuat Aplikasi VB 6 Jurusan


Pada pembelajaran kali ini, kita akan praktik membuat program Jurusan dengan VB 6.. buatlah form seperti diatas kemudian masukan listing coding seperti dibawah ini :

Private Sub Command1_Click()
Text1 = ""
Text2 = ""
Text3 = ""
Text1.SetFocus
End Sub

Private Sub Command2_Click()
End
End Sub

Private Sub Form_Load()
Text3.Enabled = False
End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)
KeyAscii = Asc(UCase(Chr(KeyAscii)))
If KeyAscii = 13 Then Text2.SetFocus
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
KeyAscii = Asc(UCase(Chr(KeyAscii)))
If KeyAscii = 13 Then
If Text2 <> "MI" And Text2 <> "KA" And Text2 <> "TK" Then
MsgBox "Jurusan tidak terdaftar"
Text2 = ""
Text2.SetFocus
Exit Sub
End If
If Text2 = "MI" Then Text3 = "MANAJEMEN INFORMATIKA"
If Text2 = "KA" Then Text3 = "KOMPUTER AKUNTANSI"
If Text2 = "TK" Then Text3 = "TEKNIK KOMPUTER"
Command1.SetFocus
End If
End Sub

Subscribe to receive free email updates:

0 Response to "Membuat Aplikasi VB 6 Jurusan"

Posting Komentar

Yuk stop jadi silent reader, tanpa komentar gan/sis blog ini bukan apa-apa