Cara Membuat Aplikasi biodata sederhana Menggunakan VB.6.0
Pada kesempatan kali ini, saya akan memposting tulisan pertama saya mengenai cara membuat aplikasi biodata sederhana menggunakan visual basic 6.0. Visual Basic (VB) adalah bahasa pemrograman tingkat tinggi yang merupakan pengembangan dari bahasa BASIC versi DOS.
BASIC (Beginners' Allpurpose Symbolic Instruction Code) merupakan bahasa pemrograman yang mudah untuk dipelajari. Perintah- perintahnya mirip dengan penggunaan bahasa sehari-hari (Inggris). Seperti ini aplikasi/program sederhana yang pernah saya buat :
Properties yang digunakan :
Object | Property | Value |
Form | Name | Form_biodata |
BackColour | &H80000009& (black) | |
StartUpPosition | CentreScreen | |
CommandButton 1 | Name | cmd_proses |
Caption | Proses | |
CommandButton 2 | Name | cmd_refresh |
Caption | Refresh | |
CommandButton 3 | Name | cmd_end |
Caption | Selesai | |
Label 1 | Name | Label1 |
Caption | Biodata Diri | |
Label 2 | Name | lbl_nama |
Caption | Nama : | |
Label 3 | Name | Lbl_ttl |
Caption | Tempat / tgl lahir : | |
Label 4 | Name | Lbl_jk |
Caption | Jenis Kelamin : | |
Label 5 | Name | Lbl_alamat |
Caption | Alamat : | |
Label 6 | Name | Lbl_bahasa |
Caption | Bahasa yang dikuasai : | |
Textbox 1 | Name | Txt_nama |
Text | ||
Textbox 2 | Name | Txt_tempat |
Text | ||
Textbox 3 | Name | Txt_alamat |
Text | ||
Multiline | True | |
Scrollbars | Vertical | |
Textbox 4 | Name | Txt_resume |
Text | ||
Multiline | True | |
Scrollbars | Both | |
ComboBox 1 | Name | Cmb_tgl |
Text | Tanggal | |
ComboBox 2 | Name | Cmb_bulan |
Text | Bulan | |
ComboBox 3 | Name | Cmb_tahun |
Text | Tahun | |
OptionButton 1 | Name | Opt_lk |
Caption | Laki-laki | |
OptionButton 2 | Name | Opt_pr |
Caption | Perempuan | |
CheckBox 1 | Name | C_basic |
Caption | Basic | |
CheckBox 2 | Name | C_c |
Caption | C | |
CheckBox 3 | Name | C_cplus |
Caption | C++ | |
CheckBox 4 | Name | C_php |
Caption | Php | |
CheckBox 5 | Name | C_java |
Caption | Java | |
Frame 1 | Name | Frame1 |
Caption | ||
Frame 2 | Name | Frame2 |
Caption | Resume : | |
Line 1 | Name | Line1 |
Dan berikut adalah listing programnya :
Private Sub cmd_end_Click()
End
End Sub
Private Sub cmd_proses_Click()
If Opt_lk.Value = True Then
jk = "Laki-laki"
Else
jk = "Perempuan"
End If
If c_basic.Value = 1 And c_c.Value = 1 And c_cplus.Value = 1 And c_php.Value And c_java.Value = 1 Then
bahasa = c_basic.Caption & ", " & c_c.Caption & ", " & c_cplus.Caption & ", " & c_php.Caption & ", " & c_java.Caption
ElseIf c_basic.Value = 1 And c_c.Value = 1 And c_cplus.Value = 1 And c_php.Value Then
bahasa = c_basic.Caption & ", " & c_c.Caption & ", " & c_cplus.Caption & ", " & c_php.Caption
ElseIf c_basic.Value = 1 And c_c.Value = 1 And c_cplus.Value = 1 Then
bahasa = c_basic.Caption & ", " & c_c.Caption & ", " & c_cplus.Caption
ElseIf c_basic.Value = 1 And c_c.Value = 1 Then
bahasa = c_basic.Caption & ", " & c_c.Caption
ElseIf c_basic.Value = 1 Then
bahasa = c_basic.Caption
ElseIf c_c.Value = 1 Then
bahasa = c_c.Caption
ElseIf c_cplus.Value = 1 Then
bahasa = c_cplus.Caption
ElseIf c_php.Value = 1 Then
bahasa = c_php.Caption
ElseIf c_java.Value = 1 Then
bahasa = c_java.Caption
Else
bahasa = "tidak ada bahasa yang dikuasai"
End If
txt_resume.Text = "Nama lengkap : " + txt_nama.Text + vbCrLf + vbCrLf + "Tempat lahir : " + txt_tempat.Text + vbCrLf + vbCrLf + "Tanggal lahir : " + cmb_tgl.Text + "-" + cmb_bulan.Text + "-" + cmb_tahun.Text + vbCrLf + vbCrLf + "Jenis kelamin : " + jk + vbCrLf + vbCrLf + "Alamat : " + txt_alamat.Text + vbCrLf + vbCrLf + "Bahasa yang dikuasai : " + vbCrLf + bahasa
End Sub
(Keterangan : untuk coding txt_resume , ditulis mendatar . karena apabila menggunakan enter , program tersebut akan error)
Private Sub cmd_refresh_Click()
txt_nama.Text = ""
txt_tempat.Text = ""
cmb_tgl.Text = ""
cmb_bulan.Text = ""
cmb_tahun.Text = ""
txt_alamat.Text = ""
End Sub
Private Sub Form_Load()
cmb_tgl.AddItem "1"
cmb_tgl.AddItem "2"
cmb_tgl.AddItem "3"
cmb_tgl.AddItem "4"
cmb_tgl.AddItem "5"
cmb_tgl.AddItem "6"
cmb_tgl.AddItem "7"
cmb_tgl.AddItem "8"
cmb_tgl.AddItem "9"
cmb_tgl.AddItem "10"
cmb_tgl.AddItem "11"
cmb_tgl.AddItem "12"
cmb_tgl.AddItem "13"
cmb_tgl.AddItem "14"
cmb_tgl.AddItem "15"
cmb_tgl.AddItem "16"
cmb_tgl.AddItem "17"
cmb_tgl.AddItem "18"
cmb_tgl.AddItem "19"
cmb_tgl.AddItem "20"
cmb_tgl.AddItem "21"
cmb_tgl.AddItem "22"
cmb_tgl.AddItem "23"
cmb_tgl.AddItem "24"
cmb_tgl.AddItem "25"
cmb_tgl.AddItem "26"
cmb_tgl.AddItem "27"
cmb_tgl.AddItem "28"
cmb_tgl.AddItem "29"
cmb_tgl.AddItem "30"
cmb_tgl.AddItem "31"
cmb_bulan.AddItem "Januari"
cmb_bulan.AddItem "Februari"
cmb_bulan.AddItem "Maret"
cmb_bulan.AddItem "April"
cmb_bulan.AddItem "Mei"
cmb_bulan.AddItem "Juni"
cmb_bulan.AddItem "Juli"
cmb_bulan.AddItem "Agustus"
cmb_bulan.AddItem "September"
cmb_bulan.AddItem "Oktober"
cmb_bulan.AddItem "November"
cmb_bulan.AddItem "Desember"
cmb_tahun.AddItem "1980"
cmb_tahun.AddItem "1981"
cmb_tahun.AddItem "1982"
cmb_tahun.AddItem "1983"
cmb_tahun.AddItem "1984"
cmb_tahun.AddItem "1985"
cmb_tahun.AddItem "1986"
cmb_tahun.AddItem "1987"
cmb_tahun.AddItem "1989"
cmb_tahun.AddItem "1990"
cmb_tahun.AddItem "1991"
cmb_tahun.AddItem "1992"
cmb_tahun.AddItem "1993"
cmb_tahun.AddItem "1994"
cmb_tahun.AddItem "1995"
cmb_tahun.AddItem "1996"
cmb_tahun.AddItem "1997"
cmb_tahun.AddItem "1998"
cmb_tahun.AddItem "1999"
cmb_tahun.AddItem "2000"
cmb_tahun.AddItem "2001"
cmb_tahun.AddItem "2002"
cmb_tahun.AddItem "2003"
cmb_tahun.AddItem "2004"
cmb_tahun.AddItem "2005"
cmb_tahun.AddItem "2006"
cmb_tahun.AddItem "2007"
cmb_tahun.AddItem "2008"
cmb_tahun.AddItem "2009"
cmb_tahun.AddItem "2010"
cmb_tahun.AddItem "2011"
cmb_tahun.AddItem "2012"
End Sub
Dan yang terakhir, inilah output dari aplikasi diatas :
Tst..