Selasa, 17 Januari 2017

contoh program menu sederhana



Program menu makanan

Private Sub Command1_Click()\\ MAKANAN
Form1.Hide        \\ Menutup Form1
Form2.Show      \\ Membuka Form2
End Sub
Private Sub Command2_Click()\\MINUMAN
Form1.Hide        \\ Menutup Form1
Form3.Show      \\ Membuka Form3
End Sub
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjX32PFIJWLjgWLTI7dCsAZl2GXmhZX-Kmuy4tcAlWQrb-xb4PDSKOmr5lgvDF3vEsNDPofUtO5S8sDUN7lbGI6ucjQ9NiRe9CkUTP_E6Bx43Lu4T0AnUSR4gVpXO4qhsiTNlEviWpZicJc/s1600/2.png


Private Sub Command1_Click()\\ORDER
Text6.Text = (Val(Text1.Text) * 4000) + (Val(Text2.Text) * 2000) + (Val(Text3.Text) * 3000) + (Val(Text4.Text) * 13000) + (Val(Text5.Text) * 14000) \\ Program Aritmatik
End Sub

Private Sub Command2_Click()\\MINUMAN
Form2.Hide        \\ Menutup Form2
Form3.Show      \\ Membuka Form3
End Sub

Private Sub Command3_Click()\\MENU
Form2.Hide \\ Menutup Form2
Form1.Show \\ Membuka Form 1
Text1.Text = " " \\ Mengosongkan text
Text2.Text = " "
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqTEBOEVLxXJmUkPNsRGzOEbM-IAts6FdTPYct75IF0KOh2kC6oA0Q58P8B5eKjU5zMeJFy5XxoOErKCY26PDmOmh6Bi9GEI_sf3zUS7QCWHHL40OYXSDVL07ApZ1-J69PgH0p7CJRWa6X/s1600/3.png
Text3.Text = " "
Text4.Text = " "
Text5.Text = " "
Text6.Text = " "
End Sub
Private Sub Command4_Click()\\TOTAL
Form2.Hide
Form4.Show
Text6.Text = (Val(Text1.Text) * 4000) + (Val(Text2.Text) * 2000) + (Val(Text3.Text) * 3000) + (Val(Text4.Text) * 13000) + (Val(Text5.Text) * 14000) // Program Aritmatik
Form4.Label1.Caption = "Nasi Putih = " & (Val(Form2.Text1.Text) * 4000) & vbNewLine & "Tahu         = " & (Val(Form2.Text2.Text) * 2000) & vbNewLine & "Tempe      = " & (Val(Form2.Text3.Text) * 3000) & vbNewLine & "Ayam         = " & (Val(Form2.Text4.Text) * 13000) & vbNewLine & "Bebek       = " & (Val(Form2.Text5.Text) * 14000)  // Program Aritmatik
Form4.Label2.Caption = "Aqua            = " & (Val(Form3.Text1.Text) * 3000) & vbNewLine & "Es Teh         = " & (Val(Form3.Text2.Text) * 4000) & vbNewLine & "Es Jeruk       = " & (Val(Form3.Text3.Text) * 8000) & vbNewLine & "Teh Anget    = " & (Val(Form3.Text4.Text) * 3000) & vbNewLine & "Jeruk Anget  = " & (Val(Form3.Text5.Text) * 7000) // Program Aritmatik
Form4.Text1.Text = Val(Form2.Text6.Text) + Val(Form3.Text6.Text) // Program Aritmatik
End Sub



Private Sub Command1_Click()\\ORDER

Text6.Text = (Val(Text1.Text) * 3000) + (Val(Text2.Text) * 4000) + (Val(Text3.Text) * 8000) + (Val(Text4.Text) * 3000) + (Val(Text5.Text) * 7000) // Program Aritmatik
End Sub
Private Sub Command2_Click()\\MAKANAN
Form3.Hide \\ Menutup Form3
Form2.Show \\ Membuka Form2
End Sub
Private Sub Command3_Click()\\MENU
Form3.Hide \\ Menutup Form3
Form1.Show \\ Membuka form1
Text1.Text = " " \\ Mengosongkan text
Text2.Text = " "
Text3.Text = " "
Text4.Text = " "
Text5.Text = " "
Text6.Text = " "
End Sub
Private Sub Command4_Click()\\TOTAL
Form3.Hide \\ Menutup Form3
Form4.Show \\ Membuka Form4
Text6.Text = (Val(Text1.Text) * 3000) + (Val(Text2.Text) * 4000) + (Val(Text3.Text) * 8000) + (Val(Text4.Text) * 3000) + (Val(Text5.Text) * 7000) // Program Aritmatik
Form4.Label1.Caption = "Nasi Putih = " & (Val(Form2.Text1.Text) * 4000) & vbNewLine & "Tahu         = " & (Val(Form2.Text2.Text) * 2000) & vbNewLine & "Tempe      = " & (Val(Form2.Text3.Text) * 3000) & vbNewLine & "Ayam         = " & (Val(Form2.Text4.Text) * 13000) & vbNewLine & "Bebek       = " & (Val(Form2.Text5.Text) * 14000) // Program Aritmatik
Form4.Label2.Caption = "Aqua            = " & (Val(Form3.Text1.Text) * 3000) & vbNewLine & "Es Teh         = " & (Val(Form3.Text2.Text) * 4000) & vbNewLine & "Es Jeruk       = " & (Val(Form3.Text3.Text) * 8000) & vbNewLine & "Teh Anget    = " & (Val(Form3.Text4.Text) * 3000) & vbNewLine & "Jeruk Anget  = " & (Val(Form3.Text5.Text) * 7000) // Program Aritmatik
Form4.Text1.Text = Val(Form2.Text6.Text) + Val(Form3.Text6.Text) // Program Aritmatik
End Sub


https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAXR27NAL7fw5mw6peFSJATZs8NBn7EXw_2zuw45tdxaEjMR53Z6BlI8EuaF8Dz7XyycLn_kn0RBgdJ0SEVXFcKTVY_qMfYNCY-r9f5LwO-5gc8OChV9cDhVmhpZP4nhNHd_Znrf768kDv/s1600/4.png

Private Sub Command1_Click()\\MENU
Form4.Hide \\ Menutup Form4
Form1.Show \\ Membuka Form1
Form2.Text1.Text = " " \\ Mengosongkan text
Form2.Text2.Text = " "
Form2.Text3.Text = " "
Form2.Text4.Text = " "
Form2.Text5.Text = " "
Form2.Text6.Text = " "

Form3.Text1.Text = " " \\ Mengosongkan text
Form3.Text2.Text = " "
Form3.Text3.Text = " "
Form3.Text4.Text = " "
Form3.Text5.Text = " "
Form3.Text6.Text = " "
End Sub
Private Sub Command2_Click()\\MAKANAN
Form4.Hide \\ Menutup Form4
Form2.Show \\ Membuka Form2
End Sub

Private Sub Command3_Click()\\MINUMAN
Form4.Hide \\ Menutup Form4
Form2.Show \\ Mebuka Form2
End Sub

Tidak ada komentar:

Posting Komentar