Sunday, January 8, 2012

Contoh Visual Basic "Kurs Mata uang & Restorant"


"Rumus"
Private Sub Command1_Click()
Form2.Show
End Sub

Private Sub Form_Load()
Text1 = Clear
Text2 = Clear

End Sub

Private Sub Option1_Click()
Text2 = Val(Text1) * 10000
End Sub

Private Sub Option2_Click()
Text2 = Val(Text1) * 8000
End Sub

Private Sub Option3_Click()
Text2 = Val(Text1) * 8500
End Sub

Private Sub Option4_Click()
Text2 = Val(Text1) * 9000
End Sub
 
 '''

 "Rumus"


Private Sub Check1_Click()
Text1 = 5000
End Sub

Private Sub Check2_Click()
Text4 = 10000
End Sub

Private Sub Check3_Click()
Text7 = 15000
End Sub

Private Sub Form_Load()
Text1 = Clear
Text2 = Clear
Text3 = Clear
Text4 = Clear
Text5 = Clear
Text6 = Clear
Text7 = Clear
Text8 = Clear
Text9 = Clear
Text10 = Clear
Text11 = Clear
Text12 = Clear
Text13 = Clear

End Sub

Private Sub Option1_Click()
Text12 = Val(Text11) * 0.05
Text13 = Val(Text11) - Val(Text12)
End Sub

Private Sub Option2_Click()
Text12 = Val(Text11) * 0.1
Text13 = Val(Text11) - Val(Text12)
End Sub

Private Sub Option3_Click()
Text12 = Val(Text11) * 0.15
Text13 = Val(Text11) - Val(Text12)
End Sub

Private Sub Text2_Change()
Text3 = Val(Text1) * Val(Text2)
Text10 = Val(Text2) + Val(Text5) + Val(Text8)
Text11 = Val(Text3) + Val(Text6) + Val(Text9)
End Sub

Private Sub Text5_Change()
Text6 = Val(Text4) * Val(Text5)
Text10 = Val(Text2) + Val(Text5) + Val(Text8)
Text11 = Val(Text3) + Val(Text6) + Val(Text9)
End Sub

Private Sub Text8_Change()
Text9 = Val(Text7) * Val(Text8)
Text10 = Val(Text2) + Val(Text5) + Val(Text8)
Text11 = Val(Text3) + Val(Text6) + Val(Text9)
End Sub
........................
"Selamat Mencoba"

No comments:

Post a Comment