Visual Basic

Option Explicit
Dim iSplash As Integer

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

Private Sub Timer1_Timer()
On Error Resume Next
iSplash = iSplash + 1
prgrmhskit.Value = prgrmhskit.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 Form1
Form1.Show
Form1.SetFocus
Unload Me
End If
End Sub

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 mnkamar_Click()
Form4.Show

End Sub

Private Sub mnpembayaran_Click()
Form3.Show
End Sub

Private Sub mnpmasuk_Click()
Form2.Show
End Sub

Private Sub cmdbersih_Click()
txtno = “”
txtnama = “”
txtalamat = “”
txtpenyakit = “”

txtno.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
txtno.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

Private Sub Form_Activate()
txtno.SetFocus
End Sub

Private Sub txtno_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtnama.SetFocus
End If
End Sub

Private Sub txtnama_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtalamat.SetFocus
End If
End Sub
Private Sub txtalamat_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtpenyakit.SetFocus
End If
End Sub

Private Sub cmdbersih1_Click()
txtnama = “”
txtpembayaran = “”
txtpemeriksaan = “”

End Sub

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

Private Sub cmdbersih_Click(Index As Integer)
txtnama = “”
txtharga = “”
txtpemeriksaan = “”
txtnama.SetFocus

End Sub

Private Sub cmdhapus_Click(Index As Integer)
Data1.Recordset.Delete
Data1.Recordset.MoveFirst

End Sub

Private Sub cmdsimpan_Click(Index As Integer)
With Data1.Recordset
.AddNew
End With
End Sub

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

End Sub

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

Private Sub txtharga_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtpemeriksaan.SetFocus
End If
End Sub

Private Sub cmdbersih_Click()
cbonokamar = “”
cbojeniskamar = “”
cboruangan = “”
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 “VIP”
cbojeniskamar.AddItem “EKONOMI”

cbonokamar.AddItem “1”
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”

cboruangan.AddItem “ANGGREK”
cboruangan.AddItem “MELATI”
cboruangan.AddItem “MAWAR”

cbofasilitas.AddItem “televisi + kulkas + ac + ruang tunggu”
cbofasilitas.AddItem “televisi + kulkas + ac”
cbofasilitas.AddItem “televisi + kulkas + kipas angin”
cbofasilitas.AddItem “televisi + kipas angin”
cbofasilitas.AddItem “kipas angin”
cbofasilitas.AddItem “tanpa fasilitas”

cbotarif.AddItem “2.500.000”
cbotarif.AddItem “2.000.000”
cbotarif.AddItem “1.500.000”
cbotarif.AddItem “1.000.000”
cbotarif.AddItem “400.000”
cbotarif.AddItem “100.000”
End Sub

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

End Sub

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