RSS

PROGRAM KALKULATOR MINI

kalkulator mini

Private Sub Command1_Click()
TxtYHS3.Text = Val(TxtYHS1.Text) + Val(TxtYHS2.Text)
TxtYHS4.Text = Val(TxtYHS1.Text) * Val(TxtYHS2.Text)
TxtYHS5.Text = Val(TxtYHS1.Text) – Val(TxtYHS2.Text)
End Sub

Private Sub Command2_Click()
TxtYHS1.SetFocus
TxtYHS1 = “”
TxtYHS2 = “”
TxtYHS3 = “”
TxtYHS4 = “”
TxtYHS5 = “”
End Sub

Private Sub Command3_Click()
Unload Me
End Sub

Private Sub TxtYHS1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
TxtYHS2.SetFocus
End If
End Sub

Private Sub TxtYHS2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
TxtYHS3.Text = Val(TxtYHS1.Text) + Val(TxtYHS2.Text)
TxtYHS4.Text = Val(TxtYHS1.Text) * Val(TxtYHS2.Text)
TxtYHS5.Text = Val(TxtYHS1.Text) – Val(TxtYHS2.Text)
End If
End Sub

Advertisements
 
Leave a comment

Posted by on February 9, 2013 in Uncategorized

 

PROGRAM SETELAH DISKON 10%

setelah diskon

Private Sub CmdHASIL_Click()
TxtYHS2.Text = Val(TxtYHS1.Text) * 0.1
TxtYHS3.Text = Val(TxtYHS1.Text) – Val(TxtYHS2.Text)
End Sub

Private Sub CmdKELUAR_Click()
Unload Me
End Sub

Private Sub CmdLAGI_Click()
TxtYHS1.SetFocus
TxtYHS1 = “”
TxtYHS2 = “”
TxtYHS3 = “”
End Sub

Private Sub TxtYHS1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
TxtYHS2.Text = Val(TxtYHS1.Text) * 0.1
TxtYHS3.Text = Val(TxtYHS1.Text) – Val(TxtYHS2.Text)
End If
End Sub

 
Leave a comment

Posted by on February 9, 2013 in Uncategorized

 

PROGRAM DUA BILANGAN

dua bilangan

Private Sub CmdHASIL_Click()
TxtYHSBIL3.Text = Val(TxtYHSBIL1.Text) * Val(TxtYHSBIL2.Text)
End Sub

Private Sub CmdKEMBALI_Click()
Unload Me
End Sub

Private Sub CmdLAGI_Click()
TxtYHSBIL1.SetFocus
TxtYHSBIL1.Text = “”
TxtYHSBIL2.Text = “”
TxtYHSBIL3.Text = “”
End Sub

Private Sub TxtYHSBIL1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
TxtYHSBIL2.SetFocus
End If
End Sub

Private Sub TxtYHSBIL2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
TxtYHSBIL3.Text = Val(TxtYHSBIL1.Text) * Val(TxtYHSBIL2.Text)
End If

End Sub

 
Leave a comment

Posted by on February 9, 2013 in Uncategorized