Rabu, 15 November 2017
TUGAS 6 KALKULATOR MENGGUNAKAN KEYPRESS
langkah - langkah membuat program kalkulator mengunakan keypress
Private Sub Command1_Click()
Text9 = Val(Text1) + Val(Text5)
Text10 = Val(Text2) / Val(Text6)
Text11 = Val(Text3) - Val(Text7)
Text12 = Val(Text4) * Val(Text8)
End Sub
Private Sub Command2_Click()
Text1 = ""
Text2 = ""
Text3 = ""
Text4 = ""
Text5 = ""
Text6 = ""
Text7 = ""
Text8 = ""
Text9 = ""
Text10 = ""
Text11 = ""
Text12 = ""
Text1.SetFocus
End Sub
Private Sub Command3_Click()
Text1 = ""
Text2 = ""
Text3 = ""
Text4 = ""
Text5 = ""
Text6 = ""
Text7 = ""
Text8 = ""
Text9 = ""
Text10 = ""
Text11 = ""
Text12 = ""
Text1.SetFocus
End Sub
Private Sub Command4_Click()
Unload Me
End Sub
Private Sub Text5_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text2.SetFocus
End If
End Sub
Private Sub Text6_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text3.SetFocus
End If
End Sub
Private Sub Text7_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text4.SetFocus
End If
End Sub
Private Sub Text8_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text9 = Val(Text1) + Val(Text5)
Text10 = Val(Text2) / Val(Text6)
Text11 = Val(Text3) - Val(Text7)
Text12 = Val(Text4) * Val(Text8)
End If
End Sub
Langganan:
Posting Komentar (Atom)
Tugas 3.7 PT. PELUANG PETANG SETIAP HARI
Private Sub cmdbatal_Click() txtnama = "" txtnik = "" txtgol = "" txtks = "" txtstatus = ...
-
KOMPAS.com — Layanan pesan instan WhatsApp sempat mengalami masalah pada Jumat (3/11/2017) dan tidak bisa diakses sama se...
-
rumus pemograman aplikasi perhitungan gaji tidak mengunankan keypress Private Sub Cmdproses_Click() Dim A, B, C, D, E, F As Double...
Tidak ada komentar:
Posting Komentar