-
Content Count
5 -
Joined
-
Last visited
Community Reputation
2 NormalAbout syahidcaex90
-
Rank
Ahli Baru
Previous Fields
-
Nama lain
syahidcaex
-
http://prntscr.com/4hirty ini antara sourcode nya. selamat mencuba :159: untuk log in form Private Sub cmdlogin_Click() Call login End Sub Function login() If txtusrname.Text = "admin" And txtpassword.Text = "password" Then Form1.Show Else 'username/password incorrect MsgBox "Password yang dimasukkan salah!", vbExclamation, "Error!" txtusrname.Text = "" 'clear username txtpassword.Text = "" 'clear password txtusrname.SetFocus 'username set focus End If End Function Private Sub txtPassword_KeyUp(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then '(if enter key was pressed) Call login End If End Sub Private Sub txtusrname_Change() End Sub untuk menu makan Dim total_makan, total_minum, kembali As Currency Dim jml, harga As Double 'declaration. Private Sub Form_Load() 'untuk timer & label/ruangan spacing label. slamat.Caption = slamat.Caption & Space(50) Timer1.Enabled = True 'time enable true. total_makan = 0 total_minum = 0 'senara nama dalam list theme. lsttema.AddItem "Merah" lsttema.AddItem "Jingga" lsttema.AddItem "Kuning" lsttema.AddItem "Hijau" lsttema.AddItem "Biru" lsttema.AddItem "Nila" lsttema.AddItem "Ungu" 'senarai makan. cbmakanan.AddItem "Nasi Goreng Special (Rm5.00)" cbmakanan.AddItem "Nasi Goreng Seafood (Rm5.50)" cbmakanan.AddItem "Mie Goreng Special (Rm4.50)" cbmakanan.AddItem "Kwetiau Goreng Special (Rm4.00)" cbmakanan.AddItem "Sambal Lada Hitam (Rm3.00)" lstminuman.AddItem "Teo O AIs (Rm1.00)" lstminuman.AddItem "Milo Ais (Rm1.50)" lstminuman.AddItem "Air BAndung(Rm2.00)" lstminuman.AddItem "Teh Layer (Rm1.20)" lstminuman.AddItem "Teo Laici Beng (Rm1.20)" End Sub Private Sub cbmakanan_Click() jml = InputBox("Silahkan Masukan Jumlah Pesanan Anda:", "Isikan Jumlah Pesanan Makanan") If jml = "" Then jml = 0 End If Select Case cbmakanan.ListIndex Case 0 harga = 5# Case 1 harga = 5.5 Case 2 harga = 4.5 Case 3 harga = 4# Case 4 harga = 3 End Select total_makan = total_makan + (harga * jml) cmdok.SetFocus End Sub Private Sub lstminuman_Click() jml = InputBox("Silahkan Masukan Jumlah Pesanan Anda:", "Isikan Jumlah Pesanan Minuman") If jml = "" Then jml = 0 End If Select Case lstminuman.ListIndex Case 0 harga = 1 Case 1 harga = 1.5 Case 2 harga = 2 Case 3 harga = 1.2 Case 4 harga = 1.2 End Select total_minum = total_minum + (harga * jml) cmdok.SetFocus End Sub Private Sub Timer1_Timer() Dim str As String str = Form1.slamat.Caption str = Mid$(str, 2, Len(str)) + Left(str, 1) Form1.slamat.Caption = str End Sub Private Sub txtbayar_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then 'tekan enter la. kembali = Val(txtbayar.Text) - Val(txttotal.Text) If kembali < 0 Then MsgBox "Maaf wang tidak mencukupi", vbOKOnly + vbCritical, "Wang Bayar Kurang!" txtbayar.SetFocus Else txtkembali.Text = kembali MsgBox "Terima Kasih Telah Memesan", vbOKOnly + vbInformation, "Informasi" slamat.Visible = True cmdclear.SetFocus End If End If End Sub Private Sub cmdclear_Click() total_makan = 0 total_minum = 0 slamat.Visible = False cbmakanan.Text = "" txttotal.Text = "" txtbayar.Text = "" txtkembali.Text = "" cbmakanan.SetFocus End Sub Private Sub cmdexit_Click() End End Sub Private Sub cmdok_Click() txttotal = total_makan + total_minum txtbayar.SetFocus End Sub Private Sub lsttema_Click() 'kod warna theme. Select Case lsttema.ListIndex Case 0 background.FillColor = &HFF& lsttema.ForeColor = &HFF& lblcreated1.ForeColor = &HFF& lblcreated2.ForeColor = &HFF& Case 1 background.FillColor = &HC000C0 lsttema.ForeColor = &HC000C0 lblcreated1.ForeColor = &HC000C0 lblcreated2.ForeColor = &HC000C0 Case 2 background.FillColor = &HFFFF& lsttema.ForeColor = &HFFFF& lblcreated1.ForeColor = &HFFFF& lblcreated2.ForeColor = &HFFFF& Case 3 background.FillColor = &HFF00& lsttema.ForeColor = &HFF00& lblcreated1.ForeColor = &HFF00& lblcreated2.ForeColor = &HFF00& Case 4 background.FillColor = &HFF0000 lsttema.ForeColor = &HFF0000 lblcreated1.ForeColor = &HFF0000 lblcreated2.ForeColor = &HFF0000 Case 5 background.FillColor = &HFF80FF lsttema.ForeColor = &HFF80FF lblcreated1.ForeColor = &HFF80FF lblcreated2.ForeColor = &HFF80FF Case 6 background.FillColor = &H800080 lsttema.ForeColor = &H800080 lblcreated1.ForeColor = &H800080 lblcreated2.ForeColor = &H800080 End Select End Sub dan terima kasih kepada google, dan programmer indonesia atas tunjuk ajar.
- 2 replies
-
- 2
-
- Virtual Basic 6
- Menu makan
-
(and 1 more)
Tagged with: