Rabu, 15 November 2017



TAMPILAN TUGAS 1 PROGRAM 1 (Data Mahasiswa Tanpa Keypress)

   
Private Sub cmdbatal_Click()
txtnpm = ""
txtnama = ""
txtalamat = ""
txtnpm.SetFocus
End Sub
Private Sub Cmdkeluar_Click()
Unload Me
End Sub
Private Sub Cmdlagi_Click()
txtnpm = ""
txtnama = ""
txtalamat = ""
txtnpm.SetFocus
End Sub

TAMPILAN TUGAS 1 PROGRAM 2 (Data Mahasiswa Menggunakan Keypress)
      
Private Sub cmdbatal_Click()
txtnpm = ""
txtnama = ""
txtalamat = ""
txtnpm.SetFocus

End Sub

Private Sub Cmdkeluar_Click()
Unload Me
End Sub

Private Sub Cmdlagi_Click()
txtnpm = ""
txtnama = ""
txtalamat = ""
txtnpm.SetFocus
End Sub


Private Sub txtnpm_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtnama.SetFocus
End If
End Sub

Private Sub txtnama_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtalamat.SetFocus
End If
End Sub

TAMPILAN TUGAS 1 PROGRAM 3 (Penjumlahan tanpa menggunakan keypress)


Private Sub cmdhitung_Click()
txtjml = Val(Txtn1) + Val(txtn2) + Val(txtn3)

End Sub

Private Sub cmdkeluar_Click()
Unload Me
End Sub

TAMPILAN TUGAS 1 PROGRAM 4 (Penjumlahan Dengan Menggunakan keypress)


Private Sub cmdhitung_Click()
txtjml = Val(Txtn1) + Val(txtn2) + Val(txtn3)

End Sub

Private Sub cmdkeluar_Click()
Unload Me
End Sub


Private Sub cmdlagi_Click()
txtnilai1 = ""
txtnilai2 = ""
txttotal = ""
txtnilai1.SetFocus
End Sub

Private Sub txtn1_keypress(keyascii As Integer)
If keyascii = 13 Then
txtn2.SetFocus
End If
End Sub

Private Sub txtn2_keypress(keyascii As Integer)
If keyascii = 13 Then
txtn3.SetFocus
End If

End Sub
Private Sub txtn3_keypress(keyascii As Integer)
If keyascii = 13 Then
txtjml = Val(Txtn1) + Val(txt2) + Val(txtn3)
End If
End Sub





TAMPILAN TUGAS 1 PROGRAM 5 (Kalkulator tanpa menggunakan keypress)


Private Sub cmdhitung_Click()
txtjml9 = Val(Txtn1) + Val(Txtn2)
Txtjml10 = Val(txtn3) - Val(txtn4)
Txtjml11 = Val(Txtn5) / Val(Txtn6)
Txtjml12 = Val(Txtn7) * Val(Txtn8)


End Sub


Private Sub cmdbatal_click()
Txtn1 = ""
Txtn2 = ""
txtn3 = ""
txtn4 = ""
Txtn5 = ""
Txtn6 = ""
Txtn7 = ""
Txtn8 = ""
txtjml9 = ""
Txtjml10 = ""
Txtjml11 = ""
Txtjml12 = ""
Txtn1.SetFocus
End Sub
Private Sub cmdlagi_Click()
Txtn1 = ""
Txtn2 = ""
txtn3 = ""
txtn4 = ""
Txtn5 = ""
Txtn6 = ""
Txtn7 = ""
Txtn8 = ""
txtjml9 = ""
Txtjml10 = ""
Txtjml11 = ""
Txtjml12 = ""
Txtn1.SetFocus
End Sub
Private Sub cmdkeluar_click()
Unload Me
End Sub

TAMPILAN TUGAS 1 PROGRAM 6 ( Kalkulator dengan menggunakan keypress


Private Sub cmdhitung_Click()
txtjml9 = Val(Txtn1) + Val(Txtn2)
Txtjml10 = Val(txtn3) - Val(txtn4)
Txtjml11 = Val(Txtn5) / Val(Txtn6)
Txtjml12 = Val(Txtn7) * Val(Txtn8)


End Sub


Private Sub cmdbatal_click()
Txtn1 = ""
Txtn2 = ""
txtn3 = ""
txtn4 = ""
Txtn5 = ""
Txtn6 = ""
Txtn7 = ""
Txtn8 = ""
txtjml9 = ""
Txtjml10 = ""
Txtjml11 = ""
Txtjml12 = ""
Txtn1.SetFocus
End Sub
Private Sub cmdlagi_Click()
Txtn1 = ""
Txtn2 = ""
txtn3 = ""
txtn4 = ""
Txtn5 = ""
Txtn6 = ""
Txtn7 = ""
Txtn8 = ""
txtjml9 = ""
Txtjml10 = ""
Txtjml11 = ""
Txtjml12 = ""
Txtn1.SetFocus
End Sub
Private Sub cmdkeluar_click()
Unload Me
End Sub



Private Sub txtn1_keypress(keyascii As Integer)
If keyascii = 13 Then
Txtn2.SetFocus
End If
End Sub
Private Sub txtn2_keypress(keyascii As Integer)
If keyascii = 13 Then
txtn3.SetFocus
End If
End Sub

Private Sub txtn3_keypress(keyascii As Integer)
If keyascii = 13 Then
txtn4.SetFocus
End If
End Sub
Private Sub txtn4_keypress(keyascii As Integer)
If keyascii = 13 Then
Txtn5.SetFocus
End If
End Sub
Private Sub txtn5_keypress(keyascii As Integer)
If keyascii = 13 Then
Txtn6.SetFocus
End If
End Sub
Private Sub txtn6_keypress(keyascii As Integer)
If keyascii = 13 Then
Txtn7.SetFocus

End If
End Sub
Private Sub txtn7_keypress(keyascii As Integer)
If keyascii = 13 Then
Txtn8.SetFocus
End If
End Sub

Private Sub txtn8_keypress(keyascii As Integer)
If keyascii = 13 Then
txtjml9 = Val(Txtn1) + (Txtn2)
Txtjml10 = Val(txtn3) - (txtn4)
Txtjml11 = Val(Txtn5) / (Txtn6)
Txtjml12 = Val(Txtn7) * (Txtn8)
End If
End Sub








 







Tidak ada komentar:

Posting Komentar