• DANAU SUOH LAMPUNG BARAT

    Photo Flipbook Slideshow Maker

  • Meta

  • zwani.com myspace graphic comments
  • Masukkan alamat surat elektronik Anda untuk mengikuti blog ini dan menerima pemberitahuan tentang tulisan baru melalui surat elektronik.

    Bergabunglah dengan 1 pengikut lainnya

  • Arsip Bulanan

  • my facebook

visual basic


1.1. MENGENAL VISUAL BASIC

Bahasa Basic pada dasarnya adalah bahasa yang mudah dimengerti sehingga pemrograman di dalam bahasa Basic dapat dengan mudah dilakukan meskipun oleh orang yang baru belajar membuat program. Hal ini lebih mudah lagi setelah hadirnya Microsoft Visual Basic, yang dibangun dari ide untuk membuat bahasa yang sederhana dan mudah dalam pembuatan scriptnya (simple scripting language) untuk graphic user interface yang dikembangkan dalam sistem operasi Microsoft Windows.

Visual Basic merupakan bahasa pemrograman yang sangat mudah dipelajari, dengan teknik pemrograman visual yang memungkinkan penggunanya untuk berkreasi lebih baik dalam menghasilkan suatu program aplikasi. Ini terlihat dari dasar pembuatan dalam visual basic adalah FORM, dimana pengguna dapat mengatur tampilan form kemudian dijalankan dalam script yang sangat mudah.

1.2. Tampilan awal visual basic

1.3. lingkungan kerja visual basic

Lembar kerja pada vidual basic dapat dilihat pada gambar dibawah ini

1.4. Komponen-komponen visual basiC

Title bar

menu bar

Menu Bar ini menampilkan perintah yang diperlukan untuk membangun aplikasi. Item menu utama memiliki item sub menu yang dapat dipilih bila diperlukan. Toolbar di bar menu menyediakan akses cepat ke perintah yang umum digunakan dan tombol pada toolbar diklik sekali untuk melakukan tindakan yang diwakili oleh itu

Tool bar

Menu standar pada windows.dapat digunakan untuk membuka project, menyimpan serta menjalankan project.

Tool box

Toolbox adalah tempat penyimpanan control yang akan digunakan pada programyang dipasang pada form.

Project

Project adalah program aplikasi itu sendiri

Properties windows

Propertis window digunakan untuk menentukan seting suatu object

form layout windws

Suatu object yang dipakai sebagai tempat bekerja program. Aplikasi dalam form terdapat garis titik-titik

immediat windows

Anda dapat menggunakan jendela langsung di vidual basic untuk mendapatkan nilai saat variabel dan untuk menjalankan kode lain. Untuk menunjukkan itu klik View | Segera. Anda hanya dapat menggunakan jendela langsung saat eksekusi kode di berhentikan (paused).

Form windws

Visual basic adalah bahasa pemrograman event driven artinya menunggu sampai adanya respon dari pemakai

Code windows

Code window adalah jendela yang berisi code-code program yang merupakan instruksi program untuk aplikasi visual basic

Event

Visual basic adalah bahasa pemrograman event driven artinya menunggu sampai adanya respon dari pemakai

Method

method adalah kemampuan objek bergerak

Module

Private Sub cbonpm_click()

Dim nama, jurusan, hm As String

Select Case cbonpm.Text

Case “11201001”

nama = “sigit pramudianto”

jurusan = “SistemInformasi”

Case “09100256”

nama = “andika”

jurusan = “SistemInformasi”

Case “09100257”

nama = “rahmat”

jurusan = “SistemInformasi”

Case “09200255”

nama = “armet”

jurusan = “ManajemenInformatika”

Case “09200170”

nama = “susanti”

jurusan = “ManajemenInformatika”

Case “09200160”

nama = “susanto”

jurusan = “ManajemenInformatika”

Case “09300150”

nama = “rina”

jurusan = “TeknikInformatika”

Case “09300140”

nama = “dadang”

jurusan = “TeknikInformatika”

Case “09300130”

nama = “marlia”

jurusan = “TeknikInformatika”

Case “09300120”

nama = “halifa”

jurusan = “TeknikInformatika”

End Select

txtnama.Text = nama

txtjurusan.Text = jurusan

txtquis.SetFocus

End Sub

Private Sub cmdbatal_Click(Index As Integer)

cbonpm.SetFocus

cbonpm.Text = “”

txtnama.Text = “”

txtjurusan.Text = “”

txtquis.Text = “”

txttugas.Text = “”

txtuts.Text = “”

txtuas.Text = “”

txthm.Text = “”

txtna.Caption = “”

End Sub

Private Sub cmdkeluar_Click()

Unload Me

End Sub

Private Sub cmdproses_Click(Index As Integer)

Dim na As Integer

Dim hm As String

nilai1 = Val(txtquis.Text)

nilai2 = Val(txttugas.Text)

nilai3 = Val(txtuts.Text)

nilai4 = Val(txtuas.Text)

na = (nilai1 + nilai2 + nilai3 + nilai4) / 4

txtna.Caption = na

If Val(txtna.Caption) >= 80 Then

txthm.Text = “A”

ElseIf Val(txtna.Caption) >= 70 Then

txthm.Text = “B”

ElseIf Val(txtna.Caption) >= 60 Then

txthm.Text = “C”

ElseIf Val(txtna.Caption) >= 50 Then

txthm.Text = “D”

Else

txthm.Text = “E”

End If

End Sub

Private Sub Form_Load()

cbonpm.AddItem “11201001”

cbonpm.AddItem “09100256”

cbonpm.AddItem “09100257”

cbonpm.AddItem “09200255”

cbonpm.AddItem “09200170”

cbonpm.AddItem “09200160”

cbonpm.AddItem “09300150”

cbonpm.AddItem “09300140”

cbonpm.AddItem “09300130”

cbonpm.AddItem “09300120”

End Sub

Private Sub txtquis_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txttugas.SetFocus

End If

End Sub

Private Sub txttugas_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txttugas.SetFocus

End If

End Sub

visual basic 4

Private Sub Check1_Click()

Label2.FontBold = Not Label2.FontBold

End Sub

Private Sub Check2_Click()

Label2.FontItalic = Not Label2.FontItalic

End Sub

Private Sub Check3_Click()

Form1.BackColor = vbGreen

Label2.BackColor = vbYellow

End Sub

Private Sub Check4_Click()

Form1.BackColor = vbYellow

End Sub

Private Sub Command1_Click()

Label2.Caption = Text1.Text

End Sub

Private Sub Command2_Click()

Unload Me

End Sub

Private Sub Option1_Click()

Label2.ForeColor = vbBlue

End Sub

Private Sub Option2_Click()

Label2.ForeColor = vbRed

End Sub

Private Sub Combo1_Click()

Dim GAPOK, PAJAK, TUNJANGAN, Total As Variant

Select Case Combo1.Text

Case “I”

GAPOK = 1500000

TUNJANGAN = 150000

Case “II”

GAPOK = 3000000

TUNJANGAN = 350000

Case “III”

GAPOK = 2500000

TUNJANGAN = 300000

Case “IV”

GAPOK = 2000000

TUNJANGAN = 200000

Case Else

GAPOK = 0

TUNJANGAN = 0

End Select

Total = (GAPOK + TUNJANGAN)

PAJAK = (Total) * 0.1

Text3.Text = GAPOK

Text4.Text = TUNJANGAN

Text5.Text = PAJAK

Text6.Text = Total – PAJAK

End Sub

Private Sub Command1_Click()

Text1.SetFocus

Text1.Text = “”

Text2.Text = “”

Text3.Text = “”

Text4.Text = “”

Text5.Text = “”

Text6.Text = “”

Combo1.Text = “”

End Sub

Private Sub Command2_Click()

Text1.SetFocus

Text1.Text = “”

Text2.Text = “”

Text3.Text = “”

Text4.Text = “”

Text5.Text = “”

Text6.Text = “”

Combo1.Text = “”

End Sub

Private Sub Command3_Click()

Unload Me

End Sub

Private Sub Form_Load()

Combo1.AddItem “I”

Combo1.AddItem “II”

Combo1.AddItem “III”

Combo1.AddItem “IV”

End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text2.SetFocus

End If

End Sub

MID PRAKTIKUM

Private Sub Combo1_Click()

Dim hargasatuan, jumlahjual, hargapenjualan, discount, hargabayar As Integer

Select Case Combo1.Text

Case “P205”

jeniskomputer = “Pentium II 500 Mega Hz”

hargasatuan = “1500000”

Case “P308”

jeniskomputer = “Pentium III 800 Mega Hz”

hargasatuan = “2100000”

Case “P310”

jeniskomputer = “Pentium III 1.0 Giga Hz”

hargasatuan = “3500000”

Case “P415”

jeniskomputer = “Pentium IV 1.5 Giga Hz”

hargasatuan = “4000000”

Case “P417”

jeniskomputer = “Pentium IV 1.7 Giga Hz”

hargasatuan = “4200000”

Case “P419”

jeniskomputer = “Pentium IV 1.9 Giga Hz”

hargasatuan = “5500000”

Case Else

jeniskomputer = 0

hargasatuan = 0

End Select

Text1.Text = jeniskomputer

Text2.Text = hargasatuan

Text2.SetFocus

End Sub

PRIVATE SUB COMMAND1_CLICK()

DIM HARGASATUAN, JUMLAHJUAL, HARGAPENJUALAN, DISCOUNT, HARGABAYAR AS INTEGER

HARGASATUAN = VAL(TEXT2.TEXT)

JUMLAHJUAL = VAL(TEXT3.TEXT)

HARGAPENJUALAN = VAL(TEXT4.TEXT)

DISCOUNT = VAL(TEXT5.TEXT)

HARGABAYAR = VAL(TEXT6.TEXT)

HARGAPENJUALAN = VAL(TEXT3.TEXT) * VAL(TEXT2.TEXT)

IF HARGAPENJUALAN > 30000000 THEN

DISCOUNT = HARGAPENJUALAN * 0.15

ELSEIF HARGAPENJUALAN > 25000000 THEN

DISCOUNT = HARGAPENJUALAN * 0.1

ELSEIF HARGAPENJUALAN > 20000000 THEN

DISCOUNT = HARGAPENJUALAN * 0.05

ELSEIF HARGAPENJUALAN > 15000000 THEN

DISCOUNT = HARGAPENJUALAN * 0.02

ELSE

END IF

TEXT2.TEXT = HARGASATUAN

TEXT3.TEXT = JUMLAHJUAL

TEXT4.TEXT = HARGAPENJUALAN

TEXT5.TEXT = DISCOUNT

TEXT6.TEXT = HARGAPENJUALAN – DISCOUNT

TEXT6.SETFOCUS

END SUB

Private Sub Command2_Click()

Combo1.SetFocus

Combo1.Text = “”

Text1.Text = “”

Text2.Text = “”

Text3.Text = “”

Text4.Text = “”

Text5.Text = “”

Text6.Text = “”

End Sub

Private Sub Command3_Click()

Unload Me

End Sub

Private Sub Form_Load()

Combo1.AddItem “P205”

Combo1.AddItem “P308”

Combo1.AddItem “P310”

Combo1.AddItem “P415”

Combo1.AddItem “P417”

Combo1.AddItem “P419”

End Sub

QUIS

Private Sub Command1_Click()

Dim a As String

Text5.Text = “20” & Left(Text2.Text, 2)

a = Mid(Text2.Text, 3, 1)

If a = “1” Then

Text3.Text = “Sistem Informasi”

ElseIf a = “2” Then

Text3.Text = “Manajemen Informasi”

ElseIf a = “3” Then

Text3.Text = “Teknik Informatika”

ElseIf a = “4” Then

Text3.Text = “Manajemen Komputer”

End If

a = Mid(Text2.Text, 4, 2)

If a = “01” Then

Text4.Text = “Strata Satu”

ElseIf a = “02” Then

Text4.Text = “Diploma Tiga”

ElseIf a = “03” Then

Text4.Text = “Diploma Empat”

ElseIf a = “04” Then

Text4.Text = “Diploma Dua”

End If

Text6.Text = Right(Text2.Text, 3)

End Sub

Private Sub Command2_Click()

Text1.SetFocus

Text1.Text = “”

Text2.Text = “”

Text3.Text = “”

Text4.Text = “”

Text5.Text = “”

Text6.Text = “”

End Sub

Private Sub Command3_Click()

Unload Me

End Sub

Private Sub Command4_Click()

Text3.SetFocus

Text3.Text = “”

Text4.Text = “”

Text5.Text = “”

Text6.Text = “”

End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text2.SetFocus

End If

End Sub

VIsual Basic 2

Menu UTama

Private Sub a_Click()
Form2.Show
End Sub

Private Sub b_Click()
Form3.Show
End Sub

Private Sub c_Click()
Form4.Show
End Sub

Private Sub d_Click()
Form5.Show

End Sub
Private Sub e_Click()
edy = MsgBox(“Trimakasih,,Assalamualaikum wr.wb???,,,,,klik OK untuk keluar”, vbYes, “perhatian”)
If edy = vbYes Then
End If
End

End Sub

Private Sub kum_Click()
Form6.Show

End Sub

Private Sub tug_Click()
Form7.Show
End Sub

SUb Menu

Private Sub cbonpm_Click()
Dim nama, jurusan, hm As String
Select Case cbonpm.Text
Case “09100102”
nama = “Ushuluddin”
jurusan = “Sistem Informasi”
Case “09100103”
nama = “Pramudita”
jurusan = “Sistem Informasi”
Case “09100104”
nama = “Rini Astuti”
jurusan = “Sistem Informasi”
Case “09200110”
nama = “Rika Aprilia”
jurusan = “Manajemen Informatika”
Case “09200111”
nama = “Restu Anggoro”
jurusan = “Manajemen Informatika”
Case “09200112”
nama = “Lia Puspita”
jurusan = “Manajemen Informatika”
Case “09300104”
nama = “Apris Gumelar”
jurusan = “Teknik Informatika”
Case “09300104”
nama = “Ayu Liasari”
jurusan = “Teknik Informatika”
Case “09300110”
nama = “Erniawati”
jurusan = “Teknik Informatika”
Case “09300112”
nama = “Agung Sutiyoso”
jurusan = “Teknik Informatika”
End Select
txtnama.Text = nama
txtjurusan.Text = jurusan
txtquis.SetFocus
End Sub
Private Sub cmdbatal_Click()
cbonpm.SetFocus
cbonpm.Text = “”
txtnama.Text = “”
txtjurusan.Text = “”
txtquis.Text = “”
txttugas.Text = “”
txtuts.Text = “”
txtuas.Text = “”
txtna.Text = “”
txthm.Text = “”
End Sub

Private Sub cmdkeluar_Click()
Unload Me
End Sub

Private Sub cmdproses_Click()
Dim na As Integer
Dim hm As String
nilai1 = Val(txtquis.Text)
nilai2 = Val(txttugas.Text)
nilai3 = Val(txtuts.Text)
nilai4 = Val(txtuas.Text)
na = (nilai1 + nilai2 + nilai3 + nilai4) / 4
txtna.Text = na
If Val(txtna.Text) >= 80 Then
txthm.Text = “A”
ElseIf Val(txtna.Text) >= 70 Then
txthm.Text = “B”
ElseIf Val(txtna.Text) >= 60 Then
txthm.Text = “C”
ElseIf Val(txtna.Text) >= 50 Then
txthm.Text = “D”
Else
End If
End Sub
Private Sub Form_Load()
cbonpm.AddItem “09100102”
cbonpm.AddItem “09100103”
cbonpm.AddItem “09100104”
cbonpm.AddItem “09200110”
cbonpm.AddItem “09200111”
cbonpm.AddItem “09200112”
cbonpm.AddItem “09300104”
cbonpm.AddItem “09300106”
cbonpm.AddItem “09300110”
cbonpm.AddItem “09300112”
End Sub

Private Sub txtquis_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txttugas.SetFocus
End If
End Sub

Private Sub txttugas_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtuts.SetFocus
End If
End Sub

Private Sub txtuas_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtna.SetFocus
End If
End Sub

Private Sub txtuts_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtuas.SetFocus
End If
End Sub

Sub Menu 2

Private Sub Combo1_Click()
Dim GAPOK, PAJAK, TUNJANGAN, Total As Variant
Select Case Combo1.Text
Case “I”
GAPOK = 1500000
TUNJANGAN = 150000
Case “II”
GAPOK = 3000000
TUNJANGAN = 350000
Case “III”
GAPOK = 2500000
TUNJANGAN = 300000
Case “IV”
GAPOK = 2000000
TUNJANGAN = 200000
Case Else
GAPOK = 0
TUNJANGAN = 0
End Select
Total = (GAPOK + TUNJANGAN)
PAJAK = (Total) * 0.1
Text3.Text = GAPOK
Text4.Text = TUNJANGAN
Text5.Text = PAJAK
Text6.Text = Total – PAJAK

End Sub

Private Sub COMMAND1_CLICK()
Text1.SetFocus
Text1.Text = “”
Text2.Text = “”
Text3.Text = “”
Text4.Text = “”
Text5.Text = “”
Text6.Text = “”
Combo1.Text = “”

End Sub

Private Sub Command2_Click()
Text1.SetFocus
Text1.Text = “”
Text2.Text = “”
Text3.Text = “”
Text4.Text = “”
Text5.Text = “”
Text6.Text = “”
Combo1.Text = “”
End Sub

Private Sub Command3_Click()
Unload Me
End Sub
Private Sub Form_Load()
Combo1.AddItem “I”
Combo1.AddItem “II”
Combo1.AddItem “III”
Combo1.AddItem “IV”

End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text2.SetFocus
End If

End Sub

Sub Menu 3

Private Sub Check1_Click()
Label2.FontBold = Not Label2.FontBold
End Sub

Private Sub Check2_Click()
Label2.FontItalic = Not Label2.FontItalic
End Sub

Private Sub check3_click()
Label2.FontUnderline = Not Label2.FontUnderline
End Sub

Private Sub Check4_Click()
Label2.FontStrikethru = Not Label2.FontStrikethru
End Sub

Private Sub cmdkeluar_Click()
Unload Me
End Sub

Private Sub COMMAND1_CLICK()
Label2.Caption = Text1.Text
End Sub
Private Sub Option1_Click()
Label2.ForeColor = vbBlue
End Sub

Private Sub Option2_Click()
Label2.ForeColor = vbRed

End Sub
Private Sub Option3_Click()
Label2.ForeColor = vbYellow
End Sub

Private Sub Option4_Click()
Label2.ForeColor = vbGreen
End Sub

Private Sub Option5_Click()
Label2.ForeColor = vbBlack
End Sub

Sub Menu 4

Private Sub COMMAND1_CLICK()
Dim a As String
Text5.Text = “20” & Left(Text2.Text, 2)
a = Mid(Text2.Text, 3, 1)
If a = “1” Then
Text3.Text = “Sistem Informasi”
ElseIf a = “2” Then
Text3.Text = “Manajemen Informasi”
ElseIf a = “3” Then
Text3.Text = “Teknik Informatika”
ElseIf a = “4” Then
Text3.Text = “Manajemen Komputer”
End If
a = Mid(Text2.Text, 4, 2)
If a = “01” Then
Text4.Text = “Strata Satu”
ElseIf a = “02” Then
Text4.Text = “Diploma Tiga”
ElseIf a = “03” Then
Text4.Text = “Diploma Empat”
ElseIf a = “04” Then
Text4.Text = “Diploma Dua”
End If
Text6.Text = Right(Text2.Text, 3)
End Sub

Private Sub Command2_Click()
Text1.SetFocus
Text1.Text = “”
Text2.Text = “”
Text3.Text = “”
Text4.Text = “”
Text5.Text = “”
Text6.Text = “”
End Sub
Private Sub Command3_Click()
Unload Me
End Sub

Private Sub command4_click()
Text3.SetFocus
Text3.Text = “”
Text4.Text = “”
Text5.Text = “”
Text6.Text = “”
End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text2.SetFocus
End If
End Sub

Sub Menu5

Private Sub COMMAND1_CLICK()
Dim a, b, c As Double
Text3.Text = Val(Text1.Text) + Val(Text2.Text)

End Sub

Private Sub Command2_Click()
Text3.Text = Val(Text1.Text) – Val(Text2.Text)

End Sub

Private Sub Command3_Click()
Text3.Text = Val(Text1.Text) * Val(Text2.Text)

End Sub

Private Sub command4_click()
Text3.Text = Val(Text1.Text) / Val(Text2.Text)

End Sub

Private Sub command5_click()
Text1 = “”
Text2 = “”
Text3 = “”

End Sub
Private Sub cmdkeluar_Click()
Unload Me

End Sub

Sub Menu 6

Private Sub Combo1_Click()
Dim HargaSatuan, JumlahJual, HargaPenjualan, Diskon, HargaBayar As Integer
Select Case Combo1.Text
Case “P205”
jeniskomputer = “Pentium II 500 Mega Hz”
HargaSatuan = “1500000”
Case “P308”
jeniskomputer = “Pentium III 800 Mega Hz”
HargaSatuan = “2100000”
Case “P310”
jeniskomputer = “Pentium III 1.0 Giga Hz”
HargaSatuan = “3500000”
Case “P415”
jeniskomputer = “Pentium IV 1.5 Giga Hz”
HargaSatuan = “4000000”
Case “P417”
jeniskomputer = “Pentium IV 1.7 Giga Hz”
HargaSatuan = “4200000”
Case “P419”
jeniskomputer = “Pentium IV 1.9 Giga Hz”
HargaSatuan = “5500000”
Case Else
jeniskomputer = 0
HargaSatuan = 0
End Select
Text1.Text = jeniskomputer
Text2.Text = HargaSatuan
Text2.SetFocus

End Sub

Private Sub COMMAND1_CLICK()
Dim HargaSatuan, JumlahJual, HargaPenjualan, Diskon, HargaBayar As Integer
HargaSatuan = Val(Text2.Text)
JumlahJual = Val(Text3.Text)
HargaPenjualan = Val(Text4.Text)
Diskon = Val(Text5.Text)
HargaBayar = Val(Text6.Text)
HargaPenjualan = Val(Text3.Text) * Val(Text2.Text)
If HargaPenjualan > 30000000 Then
Diskon = HargaPenjualan * 0.15

ElseIf HargaPenjualan > 25000000 Then
Diskon = HargaPenjualan * 0.1

ElseIf HargaPenjualan > 20000000 Then
Diskon = HargaPenjualan * 0.05

ElseIf HargaPenjualan > 15000000 Then
Diskon = HargaPenjualan * 0.02
Else
End If

Text2.Text = HargaSatuan
Text3.Text = JumlahJual
Text4.Text = HargaPenjualan
Text5.Text = Diskon
Text6.Text = HargaPenjualan – Diskon
Text6.SetFocus

End Sub

Private Sub Command2_Click()
Combo1.SetFocus
Combo1.Text = “”
Text1.Text = “”
Text2.Text = “”
Text3.Text = “”
Text4.Text = “”
Text5.Text = “”
Text6.Text = “”
End Sub

Private Sub Command3_Click()
Unload Me

End Sub

Private Sub Form_Load()
Combo1.AddItem “P205”
Combo1.AddItem “P308”
Combo1.AddItem “P310”
Combo1.AddItem “P415”
Combo1.AddItem “P417”
Combo1.AddItem “P419”
End Sub

Data Base sekolah

listing programe

Private Sub Command1_Click()
Data1.Recordset.AddNew
Text1.SetFocus
End Sub

Private Sub Command2_Click()
Data1.Recordset.Edit
End Sub

Private Sub Command3_Click()
Data1.Recordset.Update
End Sub

Private Sub Command4_Click()
Unload Me
End Sub

Private Sub Form_Load()
Combo4.AddItem “anak kandung”
Combo4.AddItem “anak tiri”
Combo4.AddItem “saudara”
Combo5.AddItem “I”
Combo5.AddItem “II”
Combo5.AddItem “III”

End Sub

Private Sub Option1_Click()
Text12.Text = “laki-laki”
End Sub

Private Sub Option2_Click()
Text12.Text = “perempuan”
End Sub

Private Sub Option3_Click()
Text13.Text = “islam”
End Sub

Private Sub Option4_Click()
Text13.Text = “protestan”
End Sub

Private Sub Option5_Click()
Text13.Text = “khatolik”
End Sub

Private Sub Option6_Click()
Text13.Text = “hindu”
End Sub

Private Sub Option7_Click()
Text13.Text = “budha”
End Sub

Private Sub Option8_Click()
Text13.Text = “protestan”
End Sub

19/9/2011

TUGAS HOTEL

LOGIN

Private Sub cmdcancel_Click()
Unload Me
End Sub
Private Sub cmdok_Click()
If txtSERVER.Text = “Komp1” And txtusername.Text = “edi priyanto” And txtpassworduser = “indonesia” Then
FRMSPLASH.Show
Unload Me
Else
MsgBox “PERIKSA KEMBALI DATA YANG ANDA MASUKKAN”
End If
End Sub
Private Sub Form_Activate()
txtpassworduser.SetFocus
End Sub
Private Sub Form_Load()
bersih
End Sub
Private Sub bersih()
txtSERVER.Text = “Komp1”
txtusername.Text = “edi priyanto”
txtpassworduser.Text = “”
End Sub

Private Sub txtusername_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtpassworduser.SetFocus
End If

End Sub

LOADING

Option Explicit
Dim iSplash As Integer

Private Sub Form_KeyPress(KeyAscii As Integer)
Unload Me
End Sub
Private Sub Frame1_Click()
Unload Me
End Sub

Private Sub Timer1_Timer()
On Error Resume Next
iSplash = iSplash + 1
prghotel.Value = prghotel.Value + 1000 / 1000
If iSplash > 100 Then
Timer1.Enabled = False
Screen.MousePointer = vbNormal
Me.WindowState = 0
Do
Me.Left = Me.Left + 3000
Me.Move Me.Left, Me.Top
DoEvents
Loop Until Me.Left > Screen.Width
Load frmmenu
frmmenu.Show
frmmenu.SetFocus
Unload Me
End If
End Sub

MENU UTAMA

Private Sub mnuexit_Click()
PSN = MsgBox(“ANDA YAKIN MAU KELUAR?”, vbCritical + vbYesNo, “PESAN”)
If PSN = vbYes Then
Unload Me
End If
End Sub

Private Sub mnujasa_Click()
Form3.Show
End Sub

Private Sub mnukamar_Click()
Form2.Show
End Sub

Private Sub mnutamu_Click()
Form1.Show
End Sub

Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
If Button.Index = 1 Then
Form1.Show
ElseIf Button.Index = 2 Then
Form2.Show
ElseIf Button.Index = 3 Then
Form3.Show
ElseIf Button.Index = 4 Then
PSN = MsgBox(“ANDA YAKIN MAU KELUAR?”, vbQuestion + vbYesNo, “PESAN”)
If PSN = vbYes Then
Unload Me
End If
End If
End Sub

DATA TAMU

Private Sub cmdbersih_Click()
txtkodetamu = “”
txtnamatamu = “”
txtnoidentitas = “”
txtnotelp = “”
txtalamat = “”
txtkodetamu.SetFocus
End Sub

Private Sub cmdhapus_Click()
Data1.Recordset.Delete
Data1.Recordset.MoveFirst

End Sub

Private Sub cmdsimpan_Click()
With Data1.Recordset
.AddNew
End With
txtkodetamu.SetFocus
End Sub

Private Sub cmdtutup_Click()
PSN = MsgBox(“ANDA YAKIN INGIN KELUAR ?”, vbQuestion + vbYesNo, “PESAN”)
If PSN = vbYes Then
Unload Me
End If
End Sub

DATA KAMAR

Private Sub cmdbersih_Click()
cbonokamar = “”
cbojeniskamar = “”
cbolantai = “”
cbofasilitas = “”
cbotarif = “”
End Sub

Private Sub cmdhapus_Click()
Data1.Recordset.Delete
Data1.Recordset.MoveFirst
End Sub

Private Sub cmdsimpan2_Click()
With Data1.Recordset
.AddNew
End With
End Sub

Private Sub cmdtutup_Click()
PSN = MsgBox(“ANDA YAKIN INGIN KELUAR ?”, vbQuestion + vbYesNo, “PESAN”)
If PSN = vbYes Then
Unload Me
End If
End Sub

Private Sub Form_Load()
cbojeniskamar.AddItem “utama-1”
cbojeniskamar.AddItem “utama-2”
cbojeniskamar.AddItem “utama-3”
cbojeniskamar.AddItem “kelas-1”
cbojeniskamar.AddItem “kelas-2”
cbojeniskamar.AddItem “kelas-3”

cbonokamar.AddItem “2”
cbonokamar.AddItem “3”
cbonokamar.AddItem “4”
cbonokamar.AddItem “5”
cbonokamar.AddItem “9”
cbonokamar.AddItem “20”
cbonokamar.AddItem “21”
cbonokamar.AddItem “22”
cbonokamar.AddItem “23”
cbonokamar.AddItem “24”
cbonokamar.AddItem “25”
cbonokamar.AddItem “26”
cbonokamar.AddItem “27”
cbonokamar.AddItem “28”
cbonokamar.AddItem “29”
cbonokamar.AddItem “30”
cbonokamar.AddItem “31”
cbonokamar.AddItem “32”
cbonokamar.AddItem “33”
cbonokamar.AddItem “34”
cbonokamar.AddItem “35”
cbonokamar.AddItem “36”
cbonokamar.AddItem “37”
cbonokamar.AddItem “38”
cbonokamar.AddItem “39”

cbolantai.AddItem “I”
cbolantai.AddItem “II”
cbolantai.AddItem “III”

cbofasilitas.AddItem “televisi + 4 single bed”
cbofasilitas.AddItem “televisi + double + single spring bed”
cbofasilitas.AddItem “televisi + 3 single bed”
cbofasilitas.AddItem “2 single bed”
cbofasilitas.AddItem “single + double spring bed”
cbofasilitas.AddItem “2 single bed”
cbofasilitas.AddItem “3 single bed”
cbofasilitas.AddItem “double + single bed”

cbotarif.AddItem “150000”
cbotarif.AddItem “130000”
cbotarif.AddItem “110000”
cbotarif.AddItem “100000”
cbotarif.AddItem “90000”
cbotarif.AddItem “70000”
End Sub

Private Sub bersih()
cbonokamar.Text = “”
cbojeniskamar.Text = “”
cbolantai.Text = “”
cbofasilitas.Text = “”
cbotarif.Text = “”

End Sub

JASA

Private Sub cmdbersih_Click()
txtkodejasa = “”
txtnamajasa = “”
txtsatuan = “”
txtharga = “”
txtkodejasa.SetFocus
End Sub

Private Sub cmdhapus_Click()
Data1.Recordset.Delete
Data1.Recordset.MoveFirst
End Sub

Private Sub cmdsimpan3_Click()
With Data1.Recordset
.AddNew
End With
End Sub

Private Sub cmdtutup_Click()
PSN = MsgBox(“ANDA YAKIN INGIN KELUAR ?”, vbQuestion + vbYesNo, “PESAN”)
If PSN = vbYes Then
Unload Me
End If
End Sub

Private Sub txtkodejasa_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtnamajasa.SetFocus
End If
End Sub

Private Sub txtnamajasa_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtsatuan.SetFocus
End If
End Sub

Private Sub txtsatuan_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtharga.SetFocus
End If
End Sub

Jika ada kesalahan mohon maaf yang sebesar besarnya,,,,,,,,

MOHON KRITIK DAN SARAN

sekian dan terimaksih

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

%d blogger menyukai ini: