Recent Posts

Subscribe via Email

Friday, 1 March 2013

Making Simple Program Using VB 6.0 (Tasks Lecture)

grtricks Media-How are all companions grtricks media, this time seeing as there is the task of the teacher to show the coding exercise I've done in college, which is a simple program using Visual Basic 6.0, a program to Program Cafe .. I am grateful to Mr. professors who assign tasks like these, because it makes semngat me to post on this blog continue increasing ...

Creating Programs Cafe



Coding Program ...
















































































Although this form of assignment from my professor, for my friend who would like to make this program please aja yah, to help his buddy following my coding which is not a given image or image ..

Private Sub cmdbersih_Click () 
menu.Text = "" 
paket.Text = "" 
listmenu.Clear 
deli.Value = False 
ditempat.Value = False 
harga1.Text = "" 
jumbel.Text = "" 
totbayar.Text = "" 
uangbayar. Text = "" 
uangkembali.Text = "" 
harga2.Text = "" 

End Sub 



Private Sub cmdkeluar_Click () 
a = MsgBox ("Are you sure you want to exit?", vbQuestion + vbYesNo, "Message") 
If a = vbYes Then 
Unload Me 
End If
End Sub 


Private Sub Form_Load () 
menu.AddItem ("Breakfast") 
menu.AddItem ("Lunch") 
paket.AddItem ("Package 1") 
paket.AddItem ("Package 2") 
End Sub 


Private Sub deli_Click ( ) 
harga2 = 5000 
jumbel.SetFocus 
End Sub 


Private Sub ditempat_Click () 
harga2 = 0 
jumbel.SetFocus 
End Sub 

Private Sub paket_Click () 
If menu.Text = "Breakfast" Then 
listmenu.Clear 
If paket.Text = "Package 1" Then 
listmenu.AddItem ("Rice Uduk") 
listmenu.AddItem ("Egg") 
listmenu.AddItem ("Tempe Orek") 
harga1 = 5000 
Else 
listmenu.AddItem ("Fried Rice") 
listmenu.AddItem ("Egg's Cow") 
listmenu . AddItem ("Fried Tempe") 
harga1 = 7000 
End If 
Else 
listmenu.Clear 
If paket.Text = "Package 1" Then 
listmenu.AddItem ("White Rice") 
listmenu.AddItem ("Chicken Grill") 
listmenu.AddItem (" vegetables ") 
harga1 = 8000 

Else 
listmenu.Clear 
listmenu.AddItem ("White Rice") 
listmenu.AddItem ("Rendang") 
listmenu.AddItem ("Vegetables") 
listmenu.AddItem ("Sambal Ijo") 
harga1 = 10000 
End If
End If
End Sub 



Private Sub jumbel_KeyPress (KeyAscii As Integer) 
If KeyAscii = 13 Then 
totbayar.Text = Val (jumbel.Text * harga1.Text) + Val (harga2.Text) 
uangbayar.SetFocus 
End If 
End Sub 

Private Sub uangbayar_KeyPress (KeyAscii As Integer) 
If KeyAscii = 13 Then 
uangkembali.Text = Val (uangbayar.Text) - Val (totbayar.Text) 
If Val (uangbayar.Text) <Val (totbayar.Text) Then  

uangkembali = ""  
a = MsgBox ("Wrong, Money Pay Smaller of Total Pay ", vbQuestion + vbOKOnly," Message ") 
If a = vbOK Then
Unload Me
End If
End If
End If
End Sub

Hopefully my job posting on this blog my baby got a fairly well .. Amin,
and for my friend Infonetku Media may help well, and we can both learn.
Salam Blogger.

0 comments:

Post a Comment

 
Related Posts Plugin for WordPress, Blogger...