tugas 1

Program 1 (Pertama)

 

 

 

  1. PROGRAM 1 ( Satu )

Private Sub command2_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Command2.SetFocus

End If

End Sub

 

Private Sub Cmdok_Click()

Txt1.Text = “”

Txt2.Text = “”

Txt3.Text = “”

End Sub

 

Private Sub txt1_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Txt2.SetFocus

End If

End Sub

 

Private Sub txt2_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Txt3.SetFocus

End If

End Sub

 

Program 2 (kedua)

 

 

 

  1. PROGRAM 2 ( SATU )

 

Private Sub Cmdkeluar_Click()

Unload Me

End Sub

 

Private Sub Cmdok_Click()

Txtnama.Text = “”

TxtTtl.Text = “”

Txtalamat.Text = “”

Txtfakultas.Text = “”

Txthobby.Text = “”

End Sub

 

Private Sub Form_Activate()

Txtnama.SetFocus

End Sub

 

Private Sub TxtNama_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

TxtTtl.SetFocus

End If

End Sub

 

Private Sub TxtTtl_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

TxtAlamat.SetFocus

End If

End Sub

 

Private Sub TxtAlamat_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

TxtFakultas.SetFocus

End If

End Sub

 

Private Sub TxtFakultas_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

TxtHooby.SetFocus

End If

End Sub

 

Tinggalkan komentar

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

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