Minggu, 04 Desember 2011

Program Visual Basic Login

Posted by Unknown On Minggu, Desember 04, 2011 | No comments
Tampilan :


Tabel User/Database:


Untuk Menampilakan DBGrid : Klik Kanan Pada Toolbox Kemudian Pilih Components Kemudian Pilih Microsoft Data Bound Grid Contorl 5.0(SP3)


Listing/Coding :


Option Explicit

Private Sub cmdlogin_Click()
On Error GoTo a
Data1.Recordset.Index = "xuser"
Data1.Recordset.Seek "=", txtuser
If Data1.Recordset!Password <> txtpass Then
MsgBox "Anda Salah Memasukkan Password", , "Info"
Else
Me.Hide
File_Master.Show
End If
Exit Sub
a:
MsgBox "Data Tidak Ada", , "Info"
txtuser.Text = ""
txtpass.Text = ""
End Sub

Private Sub cmdkeluar_Click()
Dim x As String
x = MsgBox("Are Your Sure To Exit..?!?", vbQuestion + vbYesNoCancel, "Informasi")
If x = vbYes Then
End
End If
End Sub

Senin, 14 November 2011

Program Lanjutan Visual Basic 2

Posted by Unknown On Senin, November 14, 2011 | No comments


Untuk Menampilakan DBGrid : Klik Kanan Pada Toolbox Kemudian Pilih Components Kemudian Pilih Microsoft Data Bound Grid Contorl 5.0(SP3)

Untuk Menampilkan DBCombo : Klik Kanan Pada Toolbox Kemudian Pilih Components Kemudian Pilih Microsoft Data Bound List Controls 6.0(OLEDB)

Untuk Listing Bisa Download Disini, Semoga Bermanfaat Bagi Semua...!! :D

Program Lanjutan Visual Basic

Posted by Unknown On Senin, November 14, 2011 | No comments

Untuk Menambahkan Objek DBGrid : Klik Kanan Pada Toolbox kemudian pilih Components kemudian pilih Microsoft Data Bound Grid Control 5.0(SP3)


Untung Listingnya bisa Download Disini, Selamat Mencoba...!! :D

Kamis, 03 November 2011

Program Visual Basic Restoran

Posted by Unknown On Kamis, November 03, 2011 | No comments

Sintaknya :

Sub nonaktif()
Option1.Enabled = False
Option2.Enabled = False
Option3.Enabled = False
Option4.Enabled = False
Option5.Enabled = False
Option6.Enabled = False
txtmakan1.Enabled = False
txtmakan2.Enabled = False
txtminum.Enabled = False
txtharga.Enabled = False
txtjumbel.Enabled = False
txttotal.Enabled = False
txtdiskon.Enabled = False
txttobay.Enabled = False
txtbayar.Enabled = False
txtkembali.Enabled = False
txtditempat.Enabled = False
txtdelivery.Enabled = False
End Sub

Sub aktif()
Option1.Enabled = True
Option2.Enabled = True
Option3.Enabled = True
Option4.Enabled = True
Option5.Enabled = True
Option6.Enabled = True
txtmakan1.Enabled = True
txtmakan2.Enabled = True
txtminum.Enabled = True
txtharga.Enabled = True
txtjumbel.Enabled = True
txttotal.Enabled = True
txtdiskon.Enabled = True
txttobay.Enabled = True
txtbayar.Enabled = True
txtkembali.Enabled = True
txtditempat.Enabled = True
txtdelivery.Enabled = True
End Sub

Private Sub exit_Click()
x = MsgBox("Are Your Sure To Exit?", vbQuestion + vbYesNoCancel, "Confrimasi")
If x = vbYes Then
End
End If
End Sub

Private Sub new_Click()
nonaktif
Option1.Value = False
Option2.Value = False
Option3.Value = False
Option4.Value = False
Option5.Value = False
Option6.Value = False
txtmakan1.Text = " "
txtmakan2.Text = " "
txtminum.Text = " "
txtharga.Text = " "
txtditempat.Text = " "
txtdelivery.Text = " "
txtjumbel.Text = " "
txttotal.Text = " "
txtdiskon.Text = " "
txttobay.Text = " "
txtbayar.Text = " "
txtkembali.Text = " "
End Sub

Private Sub start_Click()
aktif
End Sub

Private Sub Timer1_Timer()
tanggal.Caption = Format(date, "dddd, d mmmm yyyy")
waktu.Caption = Format(time, "hh:mm:ss")
End Sub

Private Sub Form_Activate()
nonaktif
Option1.Value = False
Option2.Value = False
Option3.Value = False
Option4.Value = False
End Sub

Private Sub Option1_Click()
Option2.Value = False
Option3.Value = False
Option4.Value = False
txtmakan1.Text = "Kentang Goreng"
txtmakan2.Text = "Nasi + Ayam Goreng"
txtminum.Text = "Pepsi Cola"
txtharga.Text = 20000
txtmakan1.Enabled = False
txtmakan2.Enabled = False
txtminum.Enabled = False
txtharga.Enabled = False
End Sub

Private Sub Option2_Click()
Option1.Value = False
Option3.Value = False
Option4.Value = False
txtmakan1.Text = "Burger Beaf"
txtmakan2.Text = "Nasi + Sup"
txtminum.Text = "Coca Cola"
txtharga.Text = 25000
txtmakan1.Enabled = False
txtmakan2.Enabled = False
txtminum.Enabled = False
txtharga.Enabled = False
End Sub

Private Sub Option3_Click()
Option1.Value = False
Option2.Value = False
Option4.Value = False
txtmakan1.Text = "Rollade Daging"
txtmakan2.Text = "Nasi + Sup + Ayam Goreng"
txtminum.Text = "Coke Float"
txtharga.Text = 30000
txtmakan1.Enabled = False
txtmakan2.Enabled = False
txtminum.Enabled = False
txtharga.Enabled = False
End Sub

Private Sub Option4_Click()
Option1.Value = False
Option2.Value = False
Option3.Value = False
txtmakan1.Text = "Kebab Chiken"
txtmakan2.Text = "Nasi + Sup + 2 Ayam Goreng"
txtminum.Text = "Bubble Float"
txtharga.Text = 45000
txtmakan1.Enabled = False
txtmakan2.Enabled = False
txtminum.Enabled = False
txtharga.Enabled = False
End Sub

Private Sub Option5_Click()
Option6.Value = False
txtdelivery.Text = 10000
txtjumbel.SetFocus
txtdelivery.Enabled = False
End Sub

Private Sub Option6_Click()
Option5.Value = False
txtditempat.Text = 0
txtjumbel.SetFocus
txtditempat.Enabled = False
End Sub

Private Sub txtjumbel_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txttotal.Text = Val(txtharga.Text) * Val(txtjumbel.Text)
If txtjumbel >= 10 Then
txtdiskon.Text = 10 / 100 * Val(txttotal.Text)
Else
txtdiskon.Text = 5 / 100 * Val(txttotal.Text)
txttobay.Text = Val(txttotal.Text) - Val(txtdiskon.Text)
End If
End If
txttotal.Enabled = False
txtdiskon.Enabled = False
txttobay.Enabled = False
txtbayar.Enabled = True
End Sub

Private Sub txtbayar_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtkembali = Val(txtbayar.Text) - Val(txttobay.Text)
End If
End Sub

Senin, 31 Oktober 2011

Program Visual Jakarta Travel Agent

Posted by Unknown On Senin, Oktober 31, 2011 | No comments

Sintaknya :

Sub bersih()
txtnama.Text = " "
txtalamat.Text = " "
cmbkode.Text = "--Pilih Paket--"
txttema.Text = " "
List1.Text = 0
Option1.Value = False
Option2.Value = False
Option3.Value = False
txtharga.Text = " "
txtjumlah.Text = " "
txttotal.Text = " "
txtcash.Text = " "
txtstatus.Text = " "
End Sub

Sub nonaktif()
txtnama.Enabled = False
txtalamat.Enabled = False
cmbkode.Enabled = False
txttema.Enabled = False
List1.Enabled = False
Option1.Enabled = False
Option2.Enabled = False
Option3.Enabled = False
txtharga.Enabled = False
txtjumlah.Enabled = False
txttotal.Enabled = False
txtcash.Enabled = False
txtstatus.Enabled = False
End Sub

Sub aktif()
txtnama.Enabled = True
txtalamat.Enabled = True
cmbkode.Enabled = True
txttema.Enabled = True
List1.Enabled = True
Option1.Enabled = True
Option2.Enabled = True
Option3.Enabled = True
txtharga.Enabled = True
txtjumlah.Enabled = True
txttotal.Enabled = True
txtcash.Enabled = True
txtstatus.Enabled = True
txtnama.SetFocus
End Sub

Private Sub Timer1_Timer()
tanggal.Caption = Format(date, "dddd,d mmmm yyyy")
waktu.Caption = Format(time, "hh:mm:ss")
End Sub

Private Sub cmdproses_Click()
aktif
bersih
End Sub

Private Sub Form_Activate()
nonaktif
cmbkode.Text = "--Pilih Paket--"
cmbkode.AddItem "Paket 1"
cmbkode.AddItem "Paket 2"
cmbkode.AddItem "Paket 3"
List1.AddItem "Bandung"
List1.AddItem "Semarang"
List1.AddItem "Surabaya"
End Sub

Private Sub cmbkode_Click()
If cmbkode.Text = "Paket 1" Then
txttema.Text = "Family Holiday"
ElseIf cmbkode.Text = "Paket 2" Then
txttema.Text = "Etnic Holiday"
Else
txttema.Text = "Mount Holiday"
End If
End Sub

Private Sub Option1_Click()
If cmbkode.Text = "Paket 1" Then
If List1.Text = "Bandung" Then
txtharga.Text = 750000
ElseIf List1.Text = "Semarang" Then
txtharga.Text = 750000
ElseIf List1.Text = "Surabaya" Then
txtharga.Text = 850000
End If
ElseIf cmbkode.Text = "Paket 2" Then
If List1.Text = "Bandung" Then
txtharga.Text = 900000
ElseIf List1.Text = "Semarang" Then
txtharga.Text = 350000
ElseIf List1.Text = "Surabaya" Then
txtharga.Text = 500000
End If
ElseIf cmbkode.Text = "Paket 3" Then
If List1.Text = "Bandung" Then
txtharga.Text = 1000000
ElseIf List1.Text = "Semarang" Then
txtharga.Text = 850000
ElseIf List1.Text = "Surabaya" Then
txtharga.Text = 550000
End If
End If
End Sub

Private Sub Option2_Click()
If cmbkode.Text = "Paket 1" Then
If List1.Text = "Bandung" Then
txtharga.Text = 550000
ElseIf List1.Text = "Semarang" Then
txtharga.Text = 650000
ElseIf List1.Text = "Surabaya" Then
txtharga.Text = 750000
End If
ElseIf cmbkode.Text = "Paket 2" Then
If List1.Text = "Bandung" Then
txtharga.Text = 800000
ElseIf List1.Text = "Semarang" Then
txtharga.Text = 250000
ElseIf List1.Text = "Surabaya" Then
txtharga.Text = 400000
End If
ElseIf cmbkode.Text = "Paket 3" Then
If List1.Text = "Bandung" Then
txtharga.Text = 900000
ElseIf List1.Text = "Semarang" Then
txtharga.Text = 750000
ElseIf List1.Text = "Surabaya" Then
txtharga.Text = 450000
End If
End If
End Sub

Private Sub Option3_Click()
If cmbkode.Text = "Paket 1" Then
If List1.Text = "Bandung" Then
txtharga.Text = 600000
ElseIf List1.Text = "Semarang" Then
txtharga.Text = 600000
ElseIf List1.Text = "Surabaya" Then
txtharga.Text = 700000
End If
ElseIf cmbkode.Text = "Paket 2" Then
If List1.Text = "Bandung" Then
txtharga.Text = 650000
ElseIf List1.Text = "Semarang" Then
txtharga.Text = 200000
ElseIf List1.Text = "Surabaya" Then
txtharga.Text = 350000
End If
ElseIf cmbkode.Text = "Paket 3" Then
If List1.Text = "Bandung" Then
txtharga.Text = 850000
ElseIf List1.Text = "Semarang" Then
txtharga.Text = 700000
ElseIf List1.Text = "Surabaya" Then
txtharga.Text = 400000
End If
End If
End Sub

Private Sub txtjumlah_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txttotal.Text = Val(txtharga.Text) * Val(txtjumlah.Text)
txtcash.SetFocus
End If
txttotal.Enabled = False
End Sub

Private Sub txtcash_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If txtcash = Val(txttotal.Text) Then
txtstatus.Text = "LUNAS"
ElseIf txtcash > Val(txttotal.Text) Then
txtstatus.Text = "Kembali " & "Rp. " & Val(txtcash.Text) - Val(txttotal.Text)
ElseIf txtcash <= Val(txttotal.Text) Then
txtstatus.Text = "Kurang " & "Rp. " & Val(txttotal.Text) - Val(txtcash.Text)
End If
cmdproses.SetFocus
nonaktif
End If
End Sub

Private Sub cmdexit_Click()
X = MsgBox("Are Your Sure To Exit?", vbQuestion + vbYesNoCancel, "INFORMASI")
If X = vbYes Then
End
End If
End Sub

Blog Archive

Blogroll