Tampilkan postingan dengan label Materi Kuliah. Tampilkan semua postingan
Tampilkan postingan dengan label Materi Kuliah. Tampilkan semua postingan

Rabu, 08 Juni 2011

Tugas UAS

Membuat Module Koneksi

Imports System.Data
Imports System.Data.Sql
Module ModuleKoneksi
Public Database As New OleDb.OleDbConnection
Public Tampil As New OleDb.OleDbCommand
Public Tampilkan As OleDb.OleDbDataReader
Public Grid As New OleDb.OleDbDataAdapter
Public Ds As New DataSet
Public Tabel, hasilcek As String
Public record As New BindingSource
Public noo As Integer
Public DMLSql As New OleDb.OleDbCommand
Public Sub Konek()
Try
Database.Close()
'Server
'Database.ConnectionString = "Provider=SQLOLEDB.1;Password=123456;Persist Security Info=True;User ID=sasa;Initial Catalog=PTJayaKarta;Data Source=192.168.10.4"
'Lokal
Database.ConnectionString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=apotik;Data Source=."
Database.Open()
Catch ex As Exception
MsgBox(ex.ToString())
End Try
End Sub
Public Sub tutupKoneksi()
Database.Close()
End Sub
End Module


1. Membuat Halaman Utama


Public Class Cover
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
obat.Show()
End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
bayar.Show()
End Sub

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
kasir.Show()
End Sub

Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
Close()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Laporanbayar.Show()
End Sub
End Class





2. Membuat Form Entry Obat




Public Class obat

Sub bersih()
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
End Sub
Sub simpanKelompok()
If Button1.Text = "Input" Then
TextBox1.Text = ""
Button1.Text = "Save"
Button2.Enabled = False
Button3.Enabled = False
Button4.Text = "Cancel"
TextBox1.Focus()
Else

If TextBox1.Text = "" Then Exit Sub
If TextBox2.Text = "" Then Exit Sub
If TextBox3.Text = "" Then Exit Sub
If TextBox4.Text = "" Then Exit Sub
Call cekrecord()
Try
If hasilcek = "False" Then
Call Konek()
Tampil.Connection = Database
Tampil.CommandType = CommandType.Text
Tampil.CommandText = "insert into Obat(kd_obat,nama_obat,jenis_obat,harga)values ('" & TextBox1.Text & "','" & TextBox2.Text & "','" & TextBox3.Text & "','" & Val(TextBox4.Text) & "')"
Tampil.ExecuteNonQuery()
Call bersih()
MsgBox("Data Telah Disimpan", MsgBoxStyle.Information, "Pesan")

Else
MsgBox("Data sudah ada, silahkan cek data yang diinput", MsgBoxStyle.Critical, "Input Data")
TextBox1.Focus()
End If
Catch ex As Exception
MsgBox(ex.ToString())
End Try
End If
End Sub
Sub cekrecord()
Call Konek()
Tampil.Connection = Database
Tampil.CommandType = CommandType.Text
Tampil.CommandText = "select * from obat where kd_obat='" & Trim(TextBox1.Text) & "'"
Tampilkan = Tampil.ExecuteReader
If Tampilkan.HasRows = True Then
hasilcek = True
Else
hasilcek = False
End If
Call tutupKoneksi()
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Call simpanKelompok()
End Sub

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
If Button4.Text = "Close" Then
Me.Close()
Else
Call bersih()
Call normal()
End If
End Sub
Sub normal()
Button1.Text = "Input"
Button1.Enabled = True
Button2.Text = "Edit"
Button2.Enabled = True
Button3.Text = "Delete"
Button3.Enabled = True
Button4.Text = "Close"
End Sub
Private Sub ListView1_ItemSelectionChanged(ByVal sender As Object, ByVal e As System.Windows.Forms.ListViewItemSelectionChangedEventArgs)
TextBox1.Text = e.Item.Text
End Sub
Sub BtHapuskelompok()
If Button3.Text = "Delete" Then
Button3.Text = "Hapus"
Button2.Enabled = False
Button1.Enabled = False
Button4.Text = "Cancel"
TextBox1.Focus()
Else
If TextBox1.Text = "" Then Exit Sub
If TextBox2.Text = "" Then Exit Sub
If TextBox3.Text = "" Then Exit Sub
If TextBox4.Text = "" Then Exit Sub
Try
Call Konek()
Tampil.Connection = Database
Tampil.CommandType = CommandType.Text
Tampil.CommandText = "delete from obat where kd_obat='" & Trim(TextBox1.Text) & "'"
Tampil.ExecuteNonQuery()
Call bersih()
TextBox1.Enabled = True
TextBox1.Focus()

MsgBox("Data Telah Dihapus", MsgBoxStyle.Information, "Pesan")
TextBox1.Focus()
Catch ex As Exception
MsgBox(ex.ToString())
End Try
End If
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Call BtHapuskelompok()
End Sub

Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
If e.KeyChar = Chr(Keys.Enter) Then
If Button1.Text = "Save" Then
Call cekrecord()
If hasilcek = False Then
TextBox2.Focus()
Else
MsgBox("Kode sudah ada, silahkan ganti kode lain", MsgBoxStyle.Critical + MsgBoxStyle.OkOnly, "Infromasi")
TextBox1.Focus()
End If
Else
Call Konek()
Tampil.Connection = Database
Tampil.CommandType = CommandType.Text
Tampil.CommandText = "select * from obat where kd_obat='" & Trim(TextBox1.Text) & "'"
Tampilkan = Tampil.ExecuteReader
If TextBox1.Text = "" Then
MsgBox("Masukan Data Terlebih Dahulu", MsgBoxStyle.Information, "Pesan")
Else
If Tampilkan.HasRows = True Then
While Tampilkan.Read()
If IsDBNull(Tampilkan("kd_obat")) Then
TextBox2.Focus()
Else
TextBox2.Text = Tampilkan("nama_obat")
TextBox3.Text = Tampilkan("jenis_obat")
TextBox4.Text = Tampilkan("harga")
TextBox1.Enabled = False
End If
End While
Else
MsgBox("Data tidak diketemukan", MsgBoxStyle.Critical + MsgBoxStyle.OkOnly, "Tambah Data")
End If
End If
End If
End If
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Call edit()
End Sub
Sub edit()
If Button2.Text = "Edit" Then
Button2.Text = "Save"
Button1.Enabled = False
Button3.Enabled = False
Button4.Text = "Cancel"
TextBox1.Focus()

Else
If TextBox1.Text = "" And TextBox2.Text = "" And TextBox3.Text = "" And TextBox4.Text = "" Then
MsgBox("Data Kurang Lengkap")
Exit Sub
End If

Try
Call Konek()
Tampil.Connection = Database
Tampil.CommandType = CommandType.Text
Tampil.CommandText = "update obat set nama_obat='" & TextBox2.Text & "',jenis_obat='" & TextBox3.Text & "',harga='" & Val(TextBox4.Text) & "' where kd_obat='" & Trim(TextBox1.Text) & "'"
Tampil.ExecuteNonQuery()

Call bersih()
MsgBox("Data Telah Diubah", MsgBoxStyle.Information, "Pesan")

TextBox1.Enabled = True
TextBox1.Focus()

Catch ex As Exception
MsgBox(ex.ToString())

End Try

End If
End Sub
End Class


3. Membuat Form Pembayaran





Public Class bayar
Sub bersih()
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
TextBox6.Text = ""
TextBox7.Text = ""
TextBox8.Text = ""
End Sub
Sub cekrecord()
Call Konek()
Tampil.Connection = Database
Tampil.CommandType = CommandType.Text
Tampil.CommandText = "select * from Pembayaran where no_nota='" & Trim(TextBox1.Text) & "'"
Tampilkan = Tampil.ExecuteReader
If Tampilkan.HasRows = True Then
hasilcek = True
Else
hasilcek = False
End If
Call tutupKoneksi()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Call simpanKelompok()
End Sub
Sub simpanKelompok()
If Button1.Text = "Input" Then
TextBox1.Text = ""
Button1.Text = "Save"
Button2.Enabled = False
Button3.Enabled = False
Button4.Text = "Cancel"
TextBox1.Focus()
Else

If TextBox1.Text = "" Then Exit Sub
If TextBox2.Text = "" Then Exit Sub
If TextBox3.Text = "" Then Exit Sub
If TextBox4.Text = "" Then Exit Sub
If TextBox5.Text = "" Then Exit Sub
If TextBox6.Text = "" Then Exit Sub
If TextBox7.Text = "" Then Exit Sub
If TextBox8.Text = "" Then Exit Sub

Call cekrecord()
Try
If hasilcek = "False" Then
Call Konek()
Tampil.Connection = Database
Tampil.CommandType = CommandType.Text
Tampil.CommandText = "insert into Pembayaran(no_nota,no_resep,kd_obat,nama_obat,kd_pasien,nama_pasien,tgl_bayar,total)values ('" & TextBox1.Text & "','" & TextBox2.Text & "','" & TextBox3.Text & "','" & TextBox4.Text & "','" & TextBox5.Text & "','" & TextBox6.Text & "','" & TextBox7.Text & "'," & TextBox8.Text & ")"
Tampil.ExecuteNonQuery()
Call bersih()
MsgBox("Data Telah Disimpan", MsgBoxStyle.Information, "Pesan")

Else
MsgBox("Data sudah ada, silahkan cek data yang diinput", MsgBoxStyle.Critical, "Input Data")
TextBox1.Focus()
End If
Catch ex As Exception
MsgBox(ex.ToString())
End Try
End If
End Sub

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
If Button4.Text = "Close" Then
Me.Close()
Call normal()
Else
Call bersih()
Call normal()
End If
End Sub
Sub normal()
Button1.Text = "Input"
Button1.Enabled = True
Button2.Text = "Edit"
Button2.Enabled = True
Button3.Text = "Delete"
Button3.Enabled = True
Button4.Text = "Close"
TextBox1.Enabled = True
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Call edit()
End Sub
Sub edit()
If Button2.Text = "Edit" Then
Button2.Text = "Save"
Button1.Enabled = False
Button3.Enabled = False
Button4.Text = "Cancel"
TextBox1.Focus()

Else
If TextBox1.Text = "" And TextBox2.Text = "" And TextBox3.Text = "" And TextBox4.Text = "" And TextBox5.Text = "" And TextBox6.Text = "" And TextBox7.Text = "" And TextBox8.Text = "" Then
MsgBox("Data Kurang Lengkap")
Exit Sub
End If

Try
Call Konek()
Tampil.Connection = Database
Tampil.CommandType = CommandType.Text
Tampil.CommandText = "update Pembayaran set nama_obat='" & TextBox4.Text & "',kd_pasien='" & TextBox5.Text & "',total='" & Val(TextBox8.Text) & "',no_resep='" & TextBox2.Text & "',kd_obat='" & TextBox3.Text & "',nama_pasien='" & TextBox6.Text & "',tgl_bayar='" & TextBox7.Text & "'where no_nota='" & TextBox1.Text & "'"
Tampil.ExecuteNonQuery()
Call bersih()
TextBox1.Enabled = True
TextBox1.Focus()
MsgBox("Data Telah Diubah", MsgBoxStyle.Information, "Pesan")

Catch ex As Exception
MsgBox(ex.ToString())

End Try

End If
End Sub

Sub BtHapuskelompok()
If Button3.Text = "Delete" Then
Button3.Text = "Hapus"
Button2.Enabled = False
Button1.Enabled = False
Button4.Text = "Cancel"
TextBox1.Focus()
Else
If TextBox1.Text = "" Then Exit Sub
If TextBox2.Text = "" Then Exit Sub
If TextBox3.Text = "" Then Exit Sub
If TextBox4.Text = "" Then Exit Sub
If TextBox5.Text = "" Then Exit Sub
If TextBox6.Text = "" Then Exit Sub
If TextBox7.Text = "" Then Exit Sub
If TextBox8.Text = "" Then Exit Sub

Try
Call Konek()
Tampil.Connection = Database
Tampil.CommandType = CommandType.Text
Tampil.CommandText = "delete from Pembayaran where no_nota='" & Trim(TextBox1.Text) & "'"
Tampil.ExecuteNonQuery()
Call bersih()
TextBox1.Enabled = True
TextBox1.Focus()

MsgBox("Data Telah Dihapus", MsgBoxStyle.Information, "Pesan")
TextBox1.Focus()
Catch ex As Exception
MsgBox(ex.ToString())
End Try
End If
End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
BtHapuskelompok()
End Sub

Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
If e.KeyChar = Chr(Keys.Enter) Then
If Button1.Text = "Save" Then
Call cekrecord()
If hasilcek = False Then
TextBox2.Focus()
Else
MsgBox("Kode sudah ada, silahkan ganti kode lain", MsgBoxStyle.Critical + MsgBoxStyle.OkOnly, "Infromasi")
TextBox1.Focus()
End If
Else
Call Konek()
Tampil.Connection = Database
Tampil.CommandType = CommandType.Text
Tampil.CommandText = "select * from Pembayaran where no_nota='" & Trim(TextBox1.Text) & "'"
Tampilkan = Tampil.ExecuteReader
If TextBox1.Text = "" Then
MsgBox("Masukan Data Terlebih Dahulu", MsgBoxStyle.Information, "Pesan")
Else
If Tampilkan.HasRows = True Then
While Tampilkan.Read()
If IsDBNull(Tampilkan("no_nota")) Then
TextBox2.Focus()
Else
TextBox2.Text = Tampilkan("no_resep")
TextBox3.Text = Tampilkan("kd_obat")
TextBox4.Text = Tampilkan("nama_obat")
TextBox5.Text = Tampilkan("kd_pasien")
TextBox6.Text = Tampilkan("nama_pasien")
TextBox7.Text = Tampilkan("tgl_bayar")
TextBox8.Text = Tampilkan("total")
TextBox1.Enabled = False
End If
End While
Else
MsgBox("Data tidak diketemukan", MsgBoxStyle.Critical + MsgBoxStyle.OkOnly, "Tambah Data")
End If
End If

End If
End If
End Sub
End Class


4. Membuat Form Kasir




Public Class kasir
Sub bersih()
TextBox1.Text = ""
TextBox2.Text = ""
End Sub
Sub normal()
Button1.Text = "Input"
Button1.Enabled = True
Button2.Text = "Edit"
Button2.Enabled = True
Button3.Text = "Delete"
Button3.Enabled = True
Button4.Text = "Close"
End Sub
Sub cekrecord()
Call Konek()
Tampil.Connection = Database
Tampil.CommandType = CommandType.Text
Tampil.CommandText = "select * from Kasir where kd_kasir='" & Trim(TextBox1.Text) & "'"
Tampilkan = Tampil.ExecuteReader
If Tampilkan.HasRows = True Then
hasilcek = True
Else
hasilcek = False
End If
Call tutupKoneksi()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Call simpanKelompok()
End Sub
Sub simpanKelompok()
If Button1.Text = "Input" Then
Button1.Text = "Save"
Button2.Enabled = False
Button3.Enabled = False
Button4.Text = "Cancel"
TextBox1.Focus()
Else
If TextBox1.Text = "" Then Exit Sub
If TextBox2.Text = "" Then Exit Sub
Call cekrecord()
Try
If hasilcek = "False" Then
Call Konek()
Tampil.Connection = Database
Tampil.CommandType = CommandType.Text
Tampil.CommandText = "insert into Kasir (kd_kasir,nama_kasir)values ('" & TextBox1.Text & "','" & TextBox2.Text & "')"
Tampil.ExecuteNonQuery()
Call bersih()
MsgBox("Data Telah Disimpan", MsgBoxStyle.Information, "Pesan")
Else
MsgBox("Data sudah ada, silahkan cek data yang diinput", MsgBoxStyle.Critical, "Input Data")
TextBox1.Focus()
End If
Catch ex As Exception
MsgBox(ex.ToString())
End Try
End If
End Sub


Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
If Button4.Text = "Close" Then
Me.Close()
Else
Call bersih()
Call normal()
End If
End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Call BtHapuskelompok()
End Sub
Sub BtHapuskelompok()
If Button3.Text = "Delete" Then
Button3.Text = "Hapus"
Button2.Enabled = False
Button1.Enabled = False
Button4.Text = "Cancel"
TextBox1.Focus()
Else
If TextBox1.Text = "" Then Exit Sub
If TextBox2.Text = "" Then Exit Sub
Try
Call Konek()
Tampil.Connection = Database
Tampil.CommandType = CommandType.Text
Tampil.CommandText = "delete from Kasir where kd_kasir='" & Trim(TextBox1.Text) & "'"
Tampil.ExecuteNonQuery()
Call bersih()
TextBox1.Enabled = True
TextBox1.Focus()

MsgBox("Data Telah Dihapus")
TextBox1.Focus()
Catch ex As Exception
MsgBox(ex.ToString())
End Try
End If
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Call edit()
End Sub
Sub edit()
If Button2.Text = "Edit" Then
Button2.Text = "Save"
Button1.Enabled = False
Button3.Enabled = False
Button4.Text = "Cancel"
TextBox1.Focus()

Else
If TextBox1.Text = "" And TextBox2.Text = "" Then
MsgBox("Data Kurang Lengkap")
Exit Sub
End If

Try
Call Konek()
Tampil.Connection = Database
Tampil.CommandType = CommandType.Text
Tampil.CommandText = "update Kasir set nama_kasir='" & TextBox2.Text & "' where kd_kasir='" & Trim(TextBox1.Text) & "'"
Tampil.ExecuteNonQuery()

Call bersih()
TextBox1.Enabled = True
TextBox1.Focus()
MsgBox("Data Telah Diubah", MsgBoxStyle.Information, "Pesan")

Catch ex As Exception
MsgBox(ex.ToString())

End Try

End If
End Sub

Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
If e.KeyChar = Chr(Keys.Enter) Then
If Button1.Text = "Save" Then
Call cekrecord()
If hasilcek = False Then
TextBox2.Focus()
Else
MsgBox("Kode sudah ada, silahkan ganti kode lain", MsgBoxStyle.Critical + MsgBoxStyle.OkOnly, "Infromasi")
TextBox1.Focus()
End If
Else
Call Konek()
Tampil.Connection = Database
Tampil.CommandType = CommandType.Text
Tampil.CommandText = "select * from Kasir where kd_kasir='" & Trim(TextBox1.Text) & "'"
Tampilkan = Tampil.ExecuteReader

If TextBox1.Text = "" Then
MsgBox("Masukan Data Terlebih Dahulu", MsgBoxStyle.Information, "Pesan")
Else
If Tampilkan.HasRows = True Then
While Tampilkan.Read()
If IsDBNull(Tampilkan("kd_kasir")) Then
TextBox2.Focus()
Else
TextBox2.Text = Tampilkan("nama_kasir")
TextBox2.Focus()
TextBox1.Enabled = False
End If
End While
Else
MsgBox("Data tidak diketemukan", MsgBoxStyle.Critical + MsgBoxStyle.OkOnly, "Tambah Data")
End If
End If
End If
End If
End Sub
End Class
Selengkapnya...

Kamis, 31 Maret 2011

Aplikasi Apotek (Tugas UTS)


Public Class Cover

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
obat.Show()
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
dataobat.Show()
End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
bayar.Show()
End Sub

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
kasir.Show()
End Sub

Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
Close()
End Sub
End Class


Public Class obat
Dim isitext(4) As String
Dim listitem As ListViewItem

Private Sub obat_Activated(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Activated
Call bersih()
Call tampilan()
End Sub
Sub bersih()
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If Button1.Text = "Input" Then
Button1.Text = "Save"
Button2.Visible = False
Button3.Visible = False
Button4.Text = "Cancel"
TextBox1.Focus()
Else
isitext(0) = Trim(TextBox1.Text)
isitext(1) = Trim(TextBox2.Text)
isitext(2) = Trim(TextBox3.Text)
isitext(3) = Trim(TextBox4.Text)
listitem = New ListViewItem(isitext)
ListView1.Items.Add(listitem)
Call bersih()
TextBox1.Focus()
End If
End Sub

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
If Button4.Text = "Close" Then
Me.Close()
Else
Call bersih()
Call normal()
End If
End Sub
Sub normal()
Button1.Text = "Input"
Button1.Visible = True
Button2.Text = "Edit"
Button2.Visible = True
Button3.Text = "Delete"
Button3.Visible = True
Button4.Text = "Close"
End Sub
Sub tampilan()
ListView1.View = View.Details
ListView1.Columns.Add("Kode Obat", 100, HorizontalAlignment.Center)
ListView1.Columns.Add("Nama Obat", 150, HorizontalAlignment.Left)
ListView1.Columns.Add("Jenis Obat", 100, HorizontalAlignment.Left)
ListView1.Columns.Add("Harga Obat", 100, HorizontalAlignment.Left)
End Sub

Private Sub ListView1_ItemSelectionChanged(ByVal sender As Object, ByVal e As System.Windows.Forms.ListViewItemSelectionChangedEventArgs) Handles ListView1.ItemSelectionChanged
TextBox1.Text = e.Item.Text
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
If Button2.Text = "Edit" Then
Button2.Text = "Save"
Button1.Visible = False
Button3.Visible = False
Button4.Text = "Cancel"
TextBox1.Focus()
End If
End Sub
End Class


Public Class dataobat
Dim isitext(4) As String
Dim listitem As ListViewItem
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
isitext(0) = Trim(TextBox1.Text)
isitext(1) = Trim(TextBox2.Text)
isitext(2) = Trim(TextBox3.Text)
isitext(3) = Trim(TextBox4.Text)
listitem = New ListViewItem(isitext)

ListView1.Items.Add(listitem)
Call bersih()
TextBox1.Focus()
End Sub
Sub tampilan()
ListView1.View = View.Details
ListView1.Columns.Add("Kode Obat", 100, HorizontalAlignment.Center)
ListView1.Columns.Add("Nama Obat", 150, HorizontalAlignment.Left)
ListView1.Columns.Add("Jenis Obat", 100, HorizontalAlignment.Left)
ListView1.Columns.Add("Harga Obat", 100, HorizontalAlignment.Left)
End Sub
Sub bersih()
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
End Sub

Private Sub ListView1_ItemSelectionChanged(ByVal sender As Object, ByVal e As System.Windows.Forms.ListViewItemSelectionChangedEventArgs) Handles ListView1.ItemSelectionChanged
TextBox1.Text = e.Item.Text
End Sub

Private Sub dataobat_Activated(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Activated
Call tampilan()
Call bersih()

End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
If Button2.Text = "Close" Then
Me.Close()
Else
Call bersih()
End If
End Sub
End Class


Public Class bayar
Dim isitext(8) As String
Dim listitem As ListViewItem

Private Sub bayar_Activated(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Activated
Call bersih()
Call preview()
End Sub
Private Sub bayar_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

End Sub
Sub bersih()
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
TextBox6.Text = ""
TextBox7.Text = ""
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If Button1.Text = "Input" Then
Button1.Text = "Save"
Button2.Visible = False
Button3.Visible = False
Button4.Text = "Cancel"
TextBox1.Focus()
Else
isitext(0) = Trim(TextBox1.Text)
isitext(1) = Trim(TextBox2.Text)
isitext(2) = Trim(TextBox3.Text)
isitext(3) = Trim(TextBox4.Text)
isitext(4) = Trim(TextBox5.Text)
isitext(5) = Trim(TextBox6.Text)
isitext(6) = Trim(DateTimePicker1.Value)
isitext(7) = Trim(TextBox7.Text)
listitem = New ListViewItem(isitext)
ListView1.Items.Add(listitem)
Call bersih()
TextBox1.Focus()
End If
End Sub

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
If Button4.Text = "Close" Then
Me.Close()
Else
Call bersih()
Call normal()
End If
End Sub
Sub normal()
Button1.Text = "Input"
Button1.Visible = True
Button2.Text = "Edit"
Button2.Visible = True
Button3.Text = "Delete"
Button3.Visible = True
Button4.Text = "Close"
End Sub
Sub preview()
ListView1.View = View.Details
ListView1.Columns.Add("No. Nota", 100, HorizontalAlignment.Center)
ListView1.Columns.Add("No. Resep", 100, HorizontalAlignment.Center)
ListView1.Columns.Add("Kode Obat", 100, HorizontalAlignment.Center)
ListView1.Columns.Add("Nama Obat", 150, HorizontalAlignment.Center)
ListView1.Columns.Add("Kode Pasien", 100, HorizontalAlignment.Center)
ListView1.Columns.Add("Nama Pasien", 150, HorizontalAlignment.Center)
ListView1.Columns.Add("Tanggal Bayar", 100, HorizontalAlignment.Center)
ListView1.Columns.Add("Total", 100, HorizontalAlignment.Center)
End Sub

Private Sub ListView1_ItemSelectionChanged(ByVal sender As Object, ByVal e As System.Windows.Forms.ListViewItemSelectionChangedEventArgs) Handles ListView1.ItemSelectionChanged
TextBox1.Text = e.Item.Text
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
If Button2.Text = "Edit" Then
Button2.Text = "Save"
Button1.Visible = False
Button3.Visible = False
Button4.Text = "Cancel"
TextBox1.Focus()
End If
End Sub
End Class


Public Class kasir
Dim isitext(2) As String
Dim listitem As ListViewItem
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If Button1.Text = "Input" Then
Button1.Text = "Save"
Button2.Visible = False
Button3.Visible = False
Button4.Text = "Cancel"
TextBox1.Focus()
Else
isitext(0) = Trim(TextBox1.Text)
isitext(1) = Trim(TextBox2.Text)
listitem = New ListViewItem(isitext)
ListView1.Items.Add(listitem)
Call bersih()
TextBox1.Focus()
End If
End Sub
Sub normal()
Button1.Text = "Input"
Button1.Visible = True
Button2.Text = "Edit"
Button2.Visible = True
Button3.Text = "Delete"
Button3.Visible = True
Button4.Text = "Close"
End Sub
Sub bersih()
TextBox1.Text = ""
TextBox2.Text = ""
End Sub

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
If Button4.Text = "Close" Then
Me.Close()
Else
Call bersih()
Call normal()
End If
End Sub
Sub tampilan()
ListView1.View = View.Details
ListView1.Columns.Add("Kode Kasir", 100, HorizontalAlignment.Center)
ListView1.Columns.Add("Nama Kasir", 150, HorizontalAlignment.Left)
End Sub

Private Sub ListView1_ItemSelectionChanged(ByVal sender As Object, ByVal e As System.Windows.Forms.ListViewItemSelectionChangedEventArgs) Handles ListView1.ItemSelectionChanged
TextBox1.Text = e.Item.Text
End Sub

Private Sub kasir_Activated(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Activated
Call bersih()
Call tampilan()
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
If Button2.Text = "Edit" Then
Button2.Text = "Save"
Button1.Visible = False
Button3.Visible = False
Button4.Text = "Cancel"
TextBox1.Focus()
End If
End Sub
End Class
Selengkapnya...

Senin, 28 Maret 2011

Part 1 & 2

Part 1


Public Class Form1
Dim jurusan As String
Dim kelas As Integer
Dim d As Integer = 5

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Call perintah()
End Sub
Sub perintah()
If TextBox1.Text = "ti" Then
TextBox2.Text = "Teknik Informatika"
ElseIf Text = "si" Then
TextBox2.Text = " Sistem Informasi"
End If
End Sub
End Class

Part 2



Public Class Form1

Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
If e.KeyChar = Chr(13) Then
TextBox2.Focus()
End If

End Sub

Private Sub TextBox2_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox2.KeyPress
If e.KeyChar = Chr(13) Then
TextBox3.Focus()
End If
End Sub

Private Sub TextBox3_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox3.KeyPress
If e.KeyChar = Chr(13) Then
TextBox4.Focus()
End If
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Proses.Click
ListBox1.Items.Add(TextBox1.Text + " " + TextBox2.Text + " " + TextBox3.Text + " " + TextBox4.Text)
End Sub

Private Sub TextBox4_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox4.KeyPress
If e.KeyChar = Chr(13) Then
Proses.Focus()
End If
End Sub

End Class
Selengkapnya...

Selasa, 15 Maret 2011

Setting DNS Server Pada OpenSuse

Buka Menu Yast Control Center

Kemudian pilih
Network Services / DNS Server
Kemudian Pilih Tab  Forwarders lalu pilih "Set Forwarders Manually"
PadaØ Kolom IP Address ketikkan alamat DNS Forwarders
Kemudian Klik Tombol Add
Contoh Seperti gambar dibawah ini:


Selengkapnya...

Jumat, 11 Maret 2011

Part 5

Penggunaan Module

Module Module1
'Public Variabel
Public nama As String, Hasil, b, h, c, Ganjil, Genap As Integer
Sub tampilnama()
nama = "Alfaqir"
End Sub
Sub hitung()
Hasil = Val(b) * Val(h)
End Sub
Sub pilih(ByVal lb1 As ListBox, ByVal lb2 As ListBox)
For i = 1 To Val(c)
If i Mod 2 = 0 Then
lb2.Items.Add(i)
ElseIf i Mod 2 = 1 Then
lb1.Items.Add(i)
End If
Next
End Sub
End Module


Form 1


Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
h = TextBox1.Text
b = TextBox2.Text
Call hitung()
TextBox3.Text = Hasil
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Call tampilnama()
TextBox4.Text = nama
End Sub
End Class


Form 2 (Menampilkan Bilangan Ganjil & Genap)

Public Class Form2
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
ListBox1.Items.Clear()
ListBox2.Items.Clear()
c = TextBox1.Text
Call pilih(ListBox1, ListBox2)
End Sub
End Class
Selengkapnya...

Kamis, 10 Maret 2011



 Public Class Puzzle2
    Dim tampung1, tampung2 As String
    Private Sub Puzzle2_Activated(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Activated
        kosong()
    End Sub

    Private Sub tukar()
        If tampung1 = Button1.Text Then
            Button1.Text = tampung2
        ElseIf tampung1 = Button2.Text Then
            Button2.Text = tampung2
        ElseIf tampung1 = Button3.Text Then
            Button3.Text = tampung2
        ElseIf tampung1 = Button4.Text Then
            Button4.Text = tampung2
        ElseIf tampung1 = Button5.Text Then
            Button5.Text = tampung2
        ElseIf tampung1 = Button6.Text Then
            Button6.Text = tampung2
        ElseIf tampung1 = Button7.Text Then
            Button7.Text = tampung2
        ElseIf tampung1 = Button8.Text Then
            Button8.Text = tampung2
        ElseIf tampung1 = Button9.Text Then
            Button9.Text = tampung2
        End If
    End Sub

    Private Sub kosong()
        tampung1 = " "
        tampung2 = " "
    End Sub
    Private Sub guna()
        Button1.Enabled = True
        Button2.Enabled = True
        Button3.Enabled = True
        Button4.Enabled = True
        Button5.Enabled = True
        Button6.Enabled = True
        Button7.Enabled = True
        Button8.Enabled = True
        Button9.Enabled = True
    End Sub

    Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
        If tampung1 = " " Then
            tampung1 = Button1.Text
            Button1.Enabled = False
        Else
            tampung2 = Button1.Text
            tukar()
            Button1.Text = tampung1
            kosong()
            guna()
        End If
        cek()
    End Sub

    Private Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click
        If tampung1 = " " Then
            tampung1 = Button2.Text
            Button2.Enabled = False
        Else
            tampung2 = Button2.Text
            tukar()
            Button2.Text = tampung1
            kosong()
            guna()
        End If
        cek()
    End Sub

    Private Sub Button3_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button3.Click
        If tampung1 = " " Then
            tampung1 = Button3.Text
            Button3.Enabled = False
        Else
            tampung2 = Button3.Text
            tukar()
            Button3.Text = tampung1
            kosong()
            guna()
        End If
        cek()
    End Sub

    Private Sub Button4_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button4.Click
        If tampung1 = " " Then
            tampung1 = Button4.Text
            Button4.Enabled = False
        Else
            tampung2 = Button4.Text
            tukar()
            Button4.Text = tampung1
            kosong()
            guna()
        End If
        cek()
    End Sub

    Private Sub Button5_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button5.Click
        If tampung1 = " " Then
            tampung1 = Button5.Text
            Button5.Enabled = False
        Else
            tampung2 = Button5.Text
            tukar()
            Button5.Text = tampung1
            kosong()
            guna()
        End If
        cek()
    End Sub

    Private Sub Button6_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button6.Click
        If tampung1 = " " Then
            tampung1 = Button6.Text
            Button6.Enabled = False
        Else
            tampung2 = Button6.Text
            tukar()
            Button6.Text = tampung1
            kosong()
            guna()
        End If
        cek()
    End Sub

    Private Sub Button7_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button7.Click
        If tampung1 = " " Then
            tampung1 = Button7.Text
            Button7.Enabled = False
        Else
            tampung2 = Button7.Text
            tukar()
            Button7.Text = tampung1
            kosong()
            guna()
        End If
        cek()
    End Sub

    Private Sub Button8_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button8.Click
        If tampung1 = " " Then
            tampung1 = Button8.Text
            Button8.Enabled = False
        Else
            tampung2 = Button8.Text
            tukar()
            Button8.Text = tampung1
            kosong()
            guna()
        End If
        cek()
    End Sub

    Private Sub Button9_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button9.Click
        If tampung1 = " " Then
            tampung1 = Button9.Text
            Button9.Enabled = False
        Else
            tampung2 = Button9.Text
            tukar()
            Button9.Text = tampung1
            kosong()
            guna()
        End If
        cek()
    End Sub
    Private Sub cek()
        If (Button1.Text = "A" And Button2.Text = "B" And Button3.Text = "C" And Button4.Text = "D") Then
            If (Button5.Text = "E" And Button6.Text = "F" And Button7.Text = "G") Then
                If (Button8.Text = "H" And Button9.Text = "I") Then
                    MessageBox.Show("Selesai")
                    Close()
                End If
            End If
        End If
    End Sub
End Class

Selengkapnya...

Senin, 07 Maret 2011

OpenSUSE Sebagai DHCP Server

DHCP (Dynamic Host Configuration Protocol) adalah protokol yang berbasis arsitektur client/server yang dipakai untuk memudahkan pengalokasian alamat IP dalam satu jaringan. Sebuah jaringan lokal yang tidak menggunakan DHCP harus memberikan alamat IP kepada semua komputer secara manual. Jika DHCP dipasang di jaringan lokal, maka semua komputer yang tersambung di jaringan akan mendapatkan alamat IP secara otomatis dari server DHCP. Selain alamat IP, banyak parameter jaringan yang dapat diberikan oleh DHCP, seperti default gateway dan DNS server. Sumber : Wikipedia.
Setting DHCP Server pada OpenSUSE sangat mudah dan proses konfigurasinya hanya membutuhkan 4 langkah singkat. Berikut adalah tahapannya:

INSTALASI
1. Buka YAST. Masukkan password root jika login sebagai user normal


2. Pilih menu Software | Software Management

3. Pada pilihan filter, pilih Pattern

4. Pilih DHCP & DNS Server. Berikan tanda centang pada pilihan yang ada
5. Klik Accept dan tunggu hingga instalasi selesai
6. Tutup YAST
KONFIGURASI
1. Buka YAST
2. Pilih menu Network Service | DHCP Server

3. Jika ada konfirmasi penggunaan Knetworkmanager, klik Continue
4. Pada wizard pertama, tentukan Network Card yang dijadikan sebagai jalur pemberian IP melalui DHCP. Pilih network card dan klik tombol Selec. Klik Next.

5. Pada wizard kedua, tentukan nama domain, alamat name server, gateway dll. Setelah selesai, klik Next.

6. Pada wizard ketiga, tentukan Alokasi IP Addres yang akan diberikan. Misalny, jika kita sudah memiliki cadangan IP statik (untuk keperluan server, Access Point dll) dari IP 192.168.200.1-192.168.200.100, maka kita bisa mendefinisikan IP Range 192.168.0.226-192.168.0.250

7. Terakhir, pilih apakah DHCP Server diaktifkan secara otomatis saat booting ataukah dijalankan secara manual. Untuk server sebaiknya tentukan agar berjalan secara otomatis pada saat booting.

Coba test salah satu klien untuk menggunakan IP DHCP dan check apakah DHCP Server mampu meresponnya dengan memberikan alokasi IP Address.
Selengkapnya...

Jumat, 04 Maret 2011

Latihan Pertemun 4


Public Class Form1

Private Sub ListBox3_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox3.SelectedIndexChanged

End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim a, b As Integer
For a = 2 To 6
ListBox1.Items.Add("*" & a)
ListBox1.Items.Add(a + 1)
Next
For b = 1 To Val(TextBox1.Text)
If b Mod 4 <> 0 Then
ListBox2.Items.Add(b)
End If
If b Mod 3 = 2 Then
ListBox3.Items.Add(b)
End If
Next
End Sub
End Class Selengkapnya...

Jumat, 25 Februari 2011

Contoh Program Sederhana



Public Class Form1
Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
If CheckBox1.Checked Then
TextBox2.Font = New Font(TextBox2.Font, TextBox2.Font.Style Or FontStyle.Bold)
Else
TextBox2.Font = New Font(TextBox2.Font, TextBox2.Font.Style And Not FontStyle.Bold)
End If
End Sub

Private Sub CheckBox3_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox3.CheckedChanged
If CheckBox1.Checked Then
TextBox2.Font = New Font(TextBox2.Font, Label2.Font.Style Or FontStyle.Italic)
Else
TextBox2.Font = New Font(TextBox2.Font, TextBox2.Font.Style And Not FontStyle.Italic)
End If
End Sub

Private Sub CheckBox2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox2.CheckedChanged
If CheckBox1.Checked Then
TextBox2.Font = New Font(TextBox2.Font, TextBox2.Font.Style Or FontStyle.Underline)
Else
TextBox2.Font = New Font(TextBox2.Font, TextBox2.Font.Style And Not FontStyle.Underline)
End If
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
TextBox2.Text = TextBox1.Text
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
End
End Sub

End Class


Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If RadioButton1.Checked Then
TextBox3.Text = Val(TextBox1.Text) + Val(TextBox2.Text)
End If
If RadioButton2.Checked Then
TextBox3.Text = Val(TextBox1.Text) - Val(TextBox2.Text)
End If
If RadioButton3.Checked Then
TextBox3.Text = Val(TextBox1.Text) * Val(TextBox2.Text)
End If
If RadioButton4.Checked Then
TextBox3.Text = Val(TextBox1.Text) / Val(TextBox2.Text)
End If

End Sub

End Class
Selengkapnya...

Objek, Properties, dan Event pada Visual Basic

Cara belajar penggunaan Objek.
Setiap objek dalam Visual Basic memiliki properti, metode, dan event. Di
dalam Visual Basic, sebuah data objek ( Setting atau atributnya ) dihubungkan
dalam sebuah properti, dan beberapa prosedur yang dioperasikan dalam objek
dihubungkan dalam sebuah metode. Sedangkan event adalah sebuah pengaturan aksi yang ada pada sebuah objek, misalnya mengklik sebuah mouse atau menekan tombol keyboard kita dapat menuliskan kode untuk merespon event yang ada. Kita juga bisa
menentukan karakteristik objek dengan mengubah propertinya. Sebuah objek juga memiliki metode. Metode merupakan bagian objek seperti halnya dengan properti. Sebenarnya, Metode adalah aksi yang akan dilakukan, saat atribut kita atur atau kita panggil.

Cara belajar penggunaan properties.
Properties merupakan suatu bagian / rangkaian penyusun dari sebuah objek, setiap penggunaan objek pasti selalu diikuti dengan propertiesnya. Kita dapat mempelajari cara penggunaan properties dengan dengan beberapa cara. Kita dapat mengisi / mengetikan secara langsung properties yang kita inginkan, namun ada juga properties yang telah menyediakan opsi – opsi atau pilihan yang berbentuk list box sehingga kita hanya tinggal memilih diantara opsi –opsi tersebut. Kita dapat melakukan percobaan terhadap tiap – tiap properties lalu kita amati pula perubahan yang terjadi pada objeknya. Tidak setiap objek memiliki properties yang sama, ad beberapa properties yang tidak dimiliki oleh objek – objek yang lainnya.

Cara Belajar Event
Event adalah suatu kejadian terhadap objek pada saat tertentu. Seperti dengan penekanan tombol keyboard, mengklik objek dan lain sebagainya. Diantara jenis – jenis event adalah event untuk mouse (contoh: click, double click, dll), Event untuk keyboard (KeyUp, KeyDown), event untuk peubahan. Kita dapat mngetikkan kode dari event yang kita inginkan pada window kode editornya.


Rangkuman Pertemuan II (18/02/2011)
 Variabel Public Adalah variabel variabel dimana nama variabelnya dapat diakses atau dibaca dalam semua form atau program, namun masih dalam satu project.
 Variabel General Adalah variabel yang dapat digunakan hanya dalam form atau kelas yang sama.
 Variabel Lokal Adalah variabel yang hanya dapat digunakan dalam ruang lingkup tempatnya berada.

Selengkapnya...

Kamis, 17 Februari 2011

Sejarah Perkembangan VB

Bahasa pemrograman Visual Basic, dikembangkan oleh Microsoft sejak tahun 1991, merupakan pengembangan dari pendahulunya yaitu bahasa pemrograman BASIC (Beginner’s All-purpose Symbolic Instruction Code) yang dikembangkan pada era 1950-an. Visual Basic merupakan salah satu Development Tool adalah alat bantu dalam membangun dan mengembangkan program aplikasi komputer dengan desain form secara visual dan adanya kemampuan untuk menggunakan komponen-komponen ActiveX yang dibuat yang disediakan oleh Microsoft Visual Basic ataupun pihak lain.
Visual Basic yang pertama adalah Visal Basic 1.0 yang dikenalkan pada tahun 1991, pendekatan yg dilakukan untuk menghubungkan bahasa pemrograman dengan GUI berasal dari prototype yg dikembang oleh “Alan Cooper” yg di sebut TRIPOD. Kemudian Microsoft mengontrak copper dan asosiasinya utk mengembangkan tripod agar dapat digunakan di windows 3.0 dibawah nama kode Ruby.

Perjalanan Bahasa Pemrograman Visual Basic dari awal hingga sekarang ini, sebagai berikut:
1. Visual Basic 1.0 (May 1991) di rilis untuk windows pada Comdex/Windows Wordltrade yg dipertunjukan di Atlanta , Georgia.
2. Visual Basic 1.0 untuk DOS dirilis pada bulan September 1992. Bahasa ini tidak kompatibel dengan Visual Basic For Windows. VB 1.0 for DOS ini pada kenyataaanya merupakan versi kelanjutan dari compiler BASIC, QuickBasic dan BASIC Professional Development System.
3. Visual Basic 2.0 dirilis pada November 1992, Cakupan pemrogramannya cukup mudah untuk digunakan dan kecepatannya juga telah di modifikasi. Khususnya pada Form yg menjadikan object dapat dibuat secara seketika, serta konsep dasar dari Class modul yg berikutnya di implementasikan pada VB 4.
4. Visual Basic 3.0 , dirilis pada musim panas 1993 dan dibagi menjadi versi standard dan professional. VB 3 memasukan Versi 1.1 dari Microsoft Jet Database Engine yg dapat membaca serta menulis database Jet (atau Access) 1.x
5. Visual Basic 4.0 (Agustus 1995) merupakan versi pertama yg dapat membuat windows program 32 bit sebaik versi 16 bit nya. VB 4 juga memperkenalkan kemampuan untuk menulis non-GUI class pada Visual Basic.
6. Visual Basic 5.0 (February 1997), Microsoft merilis secara eksklusif Visual basic untuk versi windows 32 bit . Programmer yg menulis programnya pada versi 16 bit dapat dengan mudah melakukan import porgramnya dari VB4 ke VB5. dan juga sebaliknya, program VB5 dapat diimport menjadi VB4. VB 5 memperkenalakan kemampuan untuk membuat User Control.
7. Visual Basic 6.0 (pertengahan 1999 memperbaiki beberapa cakupan, temasuk kemapuannya untuk membuat Aplikasi Web-based . Visual Basic 6 di jadwalkan akan memasuki Microsoft “fasa non Supported” dimulai pada maret 2008.
8. Visual Basic .NET (VB 7), dirilis pada tahun 2002, Beberapa yang mencoba pada versi pertama .NET ini mengemukakan bahwa bahasa ini sangat powerful tapi bahasa yg digunakan sangat berbeda dengan bahasa sebelumnya, dengan kekurangan diberbagai area, termasuk runtime-nya yang 10 kali lebih besar dari paket runtime VB6 serta peningkatan penggunan memory.
9. Visual Basic .NET 2003 (VB 7.1) , dirilis dengan menggunakan NET framework versi 1.1.
10. Visual Basic 2005 (VB 8.0) , merupakan iterasi selanjutnya dari Visual Basic .NET. dan Microsoft memutuskan untuk menghilangkan kata kata .NET pada judulnya. Pada Rilis ini , Microsoft memasukan bebrapa fitur baru, diantaranya : a) Edit and Continue , mungkin inilah kekurangan fitur terbesar dari VB .NET . pada VB 2005 ini kita diperbolehkan melakukan perubahan kode pada saat program sedang dijalankan. b) Perbaikan pada Konversi dari VB ke VB NET12Visual Basic .NET 2003 (VB 7.1) , dirilis dengan menggunakan NET framework versi 1.1.
11. IsNot Patent, merupakan salah satu fitur dari Visual Basic 2005 merupakan konversi If Not X Is Y menjadi If X IsNot Y.
12. Visual Basic 2005 Express , merupkan bagian dari Product Visual Studio. Microsoft membuat Visual Studio 2005 Express edition untuk pemula dan yg gemar dengan VB, salah satu produknya adalah Visual Basic 2005 Express yg merupakan produk gratis dari Microsoft.
13. Visual Basic “Orcas” (VB 9.0) , dirilis pada tahun 2007 dan dibangung diatas .NET 3.5. Pada rilis ini , Microsoft menambahkan beberapa fitur , diantaranya : a) True Tenary operator , yaitu fungsi If(boolean,value, value) yg digunakan untuk menggantikan fungsi IIF; b) LINQ Support; c) Ekspresi Lambda; d) XML Literals; e) Nullable types; f) Type Inferenc.
14. Visual Basic ‘VBx’ (VB 10.0) , Visual Basic 10, yang juga dkenal dengan nama VBx, akan menawarkan dukungan untuk Dynamic Language Runtime. VB 10 direncanakan akan menjadi bagian dari SilverLight 1.1.
Selengkapnya...

Tools VB

1. Picture box => Menampilkan Gambar Diam Maupun Gambar Bergerak Dari Sumber Lain.
2. Label => Kontrol Yang Bisa Digunakan Untuk Menampilkan Teks Yang Tidak Bisa Diubah Oleh User.
3. Text box => Membuat Area Teks Dimana Teksnya Bisa Diubah Oleh User atau Area Penulisan User.
4. Command button => Membuat Sebuah Tombol Pelaksana Perintah.
5. Check box => Membuat Kotak Check Yang Mudah Pemakaiannya.
6. Option button => Pemilihan Dua Keadaan Dari Banyak Pilihan, Namun Hanya Satu Pilihan Saja Yg Bisa Diaktifkan Pada Satu Saat.
7. Combo box => Menghasilkan Kontrol Merupakan Kombonasi Dari List Box Dan Text Box, Sehingga User Bisa Memasukkan Pilihan Melalui Daftar Atau Menuliskannya.
8. List box =>
List Box memiliki fungsi yang hamper sama dengan combo box, yaitu menampilkan daftar. Perbedaannya, pada combo box hanya satu pilihan yang terlihat sebelum combo box diklik, sedangkan pada list box dapat menampilkan beberapa pilihan.
9. Hscroll bar => Untuk Penggulungan Dengan Langkah Lebar Dengan Indikasi Posisi Pemilihan Dlm Posisi Horizontal.
10. Vscroll bar => Untuk Penggulungan Dengan Langkah Lebar Mengindikasikan Posisi Pemilihannya Vertical.
11. Timer => Untuk Penghitung Waktu Event Dalam Interval Yang Ditentukan.
12. Drive list box => Untuk Menampilkan Disk Drive Yang Di Miliki Komputer.
13. Dir list box => Menampilkan Direktori Dan Path.
14. File list box => Menampilkan Sebuah Daftar File.
15. Shape => Untuk Memasang Kontrol Yang Mampu Menghasilkan Sarana Agar Peamakia Bisa Menggambar Berbagai Bentuk.
17. Line => Untuk Menggmbar Garis Dengan Berbagai Variasinya.
18. Image => Untuk Menampilkan Gambar Bitmap, Icon Ataupun Metafile Pada Form.
19. Data => Menyediakan Sarana Akses Data Dalam Suatu Database.
Selengkapnya...