Tutorial
Membuat Form Online Pendaftaran Sekolah Sepak Bola
Visual Basic merupakan bahasa pemrograman
yang dapat digunakan untuk membuat suatu program sederhana. Berikut adalah
contoh langkah-langkah penggunaan visual basic 2010 dalam membuat Form online
pendaftaran sekolah sepak bola
Langkah-Langkah:
1.
Membuka Aplikasi
Visual Basic 2010
2.
Klik Windows
Form Application
Untuk memunculkan form seperti
berikut
3.
Klik menu bar-view-other windows-tollbox untuk memunculkan toolbox yang akan digunakan
4.
Membuat Form seperti di bawah ini dengan menggunakan
komponen toolbox di atas
Berikut
adalah komponen ToolBox yang digunakan dalam Form kasino ini
NO
|
Komponen
|
Properties
|
Keterangan
|
1
|
Form1
|
Name
Text
|
Form1
Pendaftaran
SSB Arsenal
|
2
|
Label1
|
Name
Text
|
Label1
|
3
|
Button
1
|
Name
Text
|
Button
1
Isi
Data
|
4
|
Button
2
|
Name
Text
|
Button
2
Keluar
|
5
|
Picturebox
1
|
Name
Text
|
Picturebox1
|
6
|
Form2
|
Name
Text
|
Form2
Data
pribadi
|
7
|
Label1
|
Name
Text
|
Label1
Nama
|
8
|
Label2
|
Name
Text
|
Label2
Jenis
Kelamin
|
9
|
Label3
|
Name
Text
|
Label3
Tempat
Lahir
|
10
|
Label4
|
Name
Text
|
Label4
Tanggal
Lahir
|
11
|
Label5
|
Name
Text
|
Label5
Alamat
|
12
|
Label6
|
Name
Text
|
Label6
Nomor
HP
|
13
|
Label7
|
Name
Text
|
Label7
Email
|
14
|
Button1
|
Name
Text
|
Button1
Next
|
15
|
Button2
|
Name
Text
|
Button2
Back
|
16
|
Button3
|
Name
Text
|
Button3
Close
|
17
|
Textbox1
|
Name
Text
|
Textbox1
|
18
|
Textbox2
|
Name
Text
|
Textbox2
|
19
|
Textbox3
|
Name
Text
|
Textbox3
|
20
|
Textbox4
|
Name
Text
|
Textbox4
|
21
|
Textbox5
|
Name
Text
|
Textbox5
|
22
|
Textbox6
|
Name
Text
|
Textbox6
|
23
|
Combobox1
|
Name
text
|
Combobox1
|
24
|
Picturebox1
|
Name
text
|
Picturebox1
|
25
|
Picturebox1
|
Name
text
|
Picturebox1
|
26
|
Monthcalender1
|
Name
Text
|
Monthcalender1
|
27
|
Form3
|
Name
Text
|
Form3
Data
Fisik
|
28
|
Textbox
1
|
Name
Text
|
Textbox
1
|
29
|
Textbox
2
|
Name
Text
|
Textbox
2
|
30
|
Textbox
3
|
Name
Text
|
Textbox
3
|
31
|
Label
1
|
Name
Text
|
Label
1
Tinggi
badan
|
32
|
Label
2
|
Name
Text
|
Label
2
Berat
badan
|
33
|
Label
3
|
Name
Text
|
Label
3
Ukuran
sepatu
|
34
|
Label
4
|
Name
Text
|
Label
4
Cm
|
35
|
Label
5
|
Name
Text
|
Label
5
Kg
|
36
|
Label
6
|
Name
Text
|
Label
6
Euro
|
37
|
Label
7
|
Name
Text
|
Label
7
Kaki
yang dominan
|
38
|
Combobox1
|
Name
Text
|
Combobox1
|
39
|
Button1
|
Name
Text
|
Button1
|
40
|
Button2
|
Name
Text
|
Button2
|
41
|
Picturebox1
|
Name
Text
|
Picturebox1
|
42
|
Form4
|
Name
Text
|
Form4
Pengalaman
Sepakbola
|
43
|
Button1
|
Name
Text
|
Button1
Pernah
|
44
|
Button2
|
Name
Text
|
Button2
Belum
|
45
|
Button3
|
Name
Text
|
Button3
Back
|
46
|
Picturebox1
|
Name
Text
|
Picturebox1
|
47
|
Form5
|
Name
Text
|
Form5
Pengalaman
SSB
|
48
|
Label
1
|
Name
Text
|
Label1
Nama
SSB Anda yang terakhir
|
49
|
Label2
|
Name
Text
|
Label2
Prestasi yang anda raih di
sekolah sepak bola sebelumnya
(boleh
lebih dari satu)
|
5/
|
Label3
|
Name
Text
|
Label3
Alasan
Pindah dari Sekolah Sepakbola Sebelumnya
|
51
|
Textbox
1
|
Name
Text
|
Textbox1
|
52
|
Textbox2
|
Name
Text
|
Textbox2
|
53
|
Textbox3
|
Name
Text
|
Textbox3
|
54
|
Textbox4
|
Name
Text
|
Textbox4
|
55
|
Textbox5
|
Name
Text
|
Textbox5
|
56
|
Textbox6
|
Name
Text
|
Textbox6
|
57
|
Textbox7
|
Name
Text
|
Textbox7
|
58
|
Picturebox1
|
Name
Text
|
Picturebox1
|
59
|
Form6
|
Name
Text
|
Form6
Posisi
|
6/
|
Radiobutton1
|
Name
Text
|
Radiobutton1
Goalkepeer
|
61
|
Radiobutton2
|
Name
Text
|
Radiobutton2
Sweeper
|
62
|
Radiobutton3
|
Name
Text
|
Radiobutton3
Defender
Center
|
63
|
Radiobutton4
|
Name
Text
|
Radiobutton4
Defender
Left
|
64
|
Radiobutton5
|
Name
Text
|
Radiobutton5
Defender
Right
|
65
|
Radiobutton6
|
Name
Text
|
Radiobutton6
Wing
Back Left
|
66
|
Radiobutton7
|
Name
Text
|
Radiobutton7
Wing
Back Right
|
67
|
Radiobutton8
|
Name
Text
|
Radiobutton8
Defensive
Midfielder
|
68
|
Radiobutton9
|
Name
Text
|
Radiobutton9
Midfielder
Center
|
69
|
Radiobutton10
|
Name
Text
|
Radiobutton10
Midfielder
Left
|
70
|
Radiobutton11
|
Name
Text
|
Radiobutton11
Midfielder
Right
|
71
|
Radiobutton12
|
Name
Text
|
Radiobutton12
Attacking
Midfielder Left
|
72
|
Radiobutton13
|
Name
Text
|
Radiobutton13
Attacking
Midfielder Center
|
73
|
Radiobutton14
|
Name
Text
|
Radiobutton14
Attacking
Midfielder Right
|
74
|
Radiobutton15
|
Name
Text
|
Radiobutton15
Striker
|
75
|
Label1
|
Name
Text
|
Label1
Posisi
yang paling anda minati
|
76
|
Label2
|
Name
Text
|
Label2
Kiper
|
78
|
Label3
|
Name
Text
|
Label3
Belakang
|
79
|
Label4
|
Name
Text
|
Label4
Tengah
|
80
|
Label5
|
Name
Text
|
Label5
Depan
|
81
|
Button
1
|
Name
Text
|
Button
1
|
82
|
Button
2
|
Name
Text
|
Button
2
|
83
|
Picturebox1
|
Name
Text
|
Picturebox1
|
84
|
Picturebox2
|
Name
Text
|
Picturebox2
|
85
|
Form
7
|
Name
Text
|
Form
7
Selamat
Bergabung
|
86
|
Label1
|
Name
Text
|
Label1
Selamat Bergabung
Di
SSI Arsenal
|
87
|
Form
8
|
Name
Text
|
Form
8
?????
|
88
|
Label1
|
Name
Text
|
Label1
Apakah
Anda Yakin Dengan Data Yang Anda Isi?
|
89
|
Button1
|
Name
Text
|
Button1
Yakin
|
90
|
Button2
|
Name
Text
|
Button2
Cek
dari awal
|
91
|
Picturebox1
|
Name
Text
|
Picturebox1
|
Agar program berjalan, buatlah
listing sebagai berikut:
1.
Double click pada
design Form Pendaftaran SSB Arsenal,dan masukkan listing berikut
Public Class Form1
Private Sub ListBox1_SelectedIndexChanged(ByVal sender As
System.Object, ByVal
e As System.EventArgs)
End Sub
Private Sub Button2_Click(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
Keluar.Click
Close()
End Sub
Private Sub Label1_Click(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
Label1.Click
End Sub
Private Sub Daftar_Click(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
Daftar.Click
Form2.Show()
Me.Hide()
End Sub
Private Sub Form1_Load(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
MyBase.Load
End Sub
Private Sub PictureBox1_Click(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
PictureBox1.Click
End Sub
End Class
2.
Double click pada Form
Data Pribadi
Public Class Form2
Private Sub Label1_Click(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
Label1.Click
End Sub
Private Sub TextBox1_TextChanged(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
TextBox1.TextChanged
If
TextBox1.Text = "" Or
TextBox2.Text = "" Or
TextBox3.Text = "" Or
TextBox4.Text = "" Or
TextBox5.Text = "" Or
TextBox6.Text = "" Or
ComboBox1.Text = "" Then
Button1.Enabled = False
Else :
Button1.Enabled = True
End If
End Sub
Private Sub Label3_Click(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
Label3.Click
End Sub
Private Sub Label4_Click(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
Label4.Click
End Sub
Private Sub TextBox5_TextChanged(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
TextBox5.TextChanged
If
TextBox1.Text = "" Or
TextBox2.Text = "" Or
TextBox3.Text = "" Or
TextBox4.Text = "" Or
TextBox5.Text = "" Or
TextBox6.Text = "" Or
ComboBox1.Text = "" Then
Button1.Enabled = False
Else :
Button1.Enabled = True
End If
End Sub
Private Sub Label6_Click(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
Label6.Click
End Sub
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As
System.Object, ByVal
e As System.EventArgs)
Handles ComboBox1.SelectedIndexChanged
If
TextBox1.Text = "" Or
TextBox2.Text = "" Or
TextBox3.Text = "" Or
TextBox4.Text = "" Or
TextBox5.Text = "" Or
TextBox6.Text = "" Or
ComboBox1.Text = "" Then
Button1.Enabled = False
Else :
Button1.Enabled = True
End If
End Sub
Private Sub Button1_Click(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
Button1.Click
Form3.Show()
Me.Hide()
End Sub
Private Sub Button2_Click(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
Button2.Click
Form1.Show()
Me.Hide()
End Sub
Private Sub Button3_Click(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
Button3.Click
Close()
End Sub
Private Sub TextBox2_TextChanged(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
TextBox2.TextChanged
If
TextBox1.Text = "" Or
TextBox2.Text = ""
Or
TextBox3.Text = "" Or
TextBox4.Text = "" Or
TextBox5.Text = "" Or
TextBox6.Text = "" Or
ComboBox1.Text = "" Then
Button1.Enabled = False
Else :
Button1.Enabled = True
End If
End Sub
Private Sub Form2_Load(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
MyBase.Load
If
TextBox1.Text = "" Or
TextBox2.Text = "" Or
TextBox3.Text = "" Or
TextBox4.Text = "" Or
TextBox5.Text = "" Or
TextBox6.Text = "" Or
ComboBox1.Text = "" Then
Button1.enabled = False
Else :
Button1.Enabled = True
End If
End Sub
Private Sub TextBox4_TextChanged(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
TextBox4.TextChanged
If
TextBox1.Text = "" Or
TextBox2.Text = "" Or
TextBox3.Text = "" Or
TextBox4.Text = "" Or
TextBox5.Text = "" Or
TextBox6.Text = "" Or
ComboBox1.Text = "" Then
Button1.Enabled = False
Else :
Button1.Enabled = True
End If
End Sub
Private Sub TextBox3_TextChanged(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
TextBox3.TextChanged
If
TextBox1.Text = "" Or
TextBox2.Text = "" Or
TextBox3.Text = "" Or
TextBox4.Text = "" Or
TextBox5.Text = "" Or
TextBox6.Text = "" Or
ComboBox1.Text = "" Then
Button1.Enabled = False
Else :
Button1.Enabled = True
End If
End Sub
Private Sub TextBox6_TextChanged(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
TextBox6.TextChanged
If
TextBox1.Text = "" Or
TextBox2.Text = "" Or
TextBox3.Text = "" Or
TextBox4.Text = "" Or
TextBox5.Text = "" Or
TextBox6.Text = "" Or
ComboBox1.Text = "" Then
Button1.Enabled = False
Else :
Button1.Enabled = True
End If
End Sub
Private Sub PictureBox1_Click(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
PictureBox1.Click
End Sub
Private Sub MonthCalendar1_DateChanged(ByVal sender As
System.Object, ByVal
e As System.Windows.Forms.DateRangeEventArgs) Handles
MonthCalendar1.DateChanged
End Sub
End Class
3.
Double click pada Form
Data Fisik
Public Class Form3
Private Sub Label1_Click(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
Label1.Click
End Sub
Private Sub Label4_Click(ByVal
sender As System.Object,
ByVal e As
System.EventArgs)
End Sub
Private Sub Button1_Click(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
Button1.Click
Form4.Show()
Me.Hide()
End Sub
Private Sub Button2_Click(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
Button2.Click
Form2.Show()
Me.Hide()
End Sub
Private Sub Form3_Load(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
MyBase.Load
If
TextBox1.Text = "" Or
TextBox2.Text = "" Or
TextBox3.Text = "" Or
ComboBox1.Text = "" Then
Button1.Enabled = False
Else :
Button1.Enabled = True
End If
End Sub
Private Sub TextBox1_TextChanged(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
TextBox1.TextChanged
If
TextBox1.Text = "" Or
TextBox2.Text = "" Or
TextBox3.Text = "" Or
ComboBox1.Text = "" Then
Button1.Enabled = False
Else :
Button1.Enabled = True
End If
End Sub
Private Sub TextBox2_TextChanged(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
TextBox2.TextChanged
If
TextBox1.Text = "" Or
TextBox2.Text = "" Or
TextBox3.Text = "" Or
ComboBox1.Text = "" Then
Button1.Enabled = False
Else : Button1.Enabled = True
End If
End Sub
Private Sub TextBox3_TextChanged(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
TextBox3.TextChanged
If
TextBox1.Text = "" Or
TextBox2.Text = "" Or
TextBox3.Text = "" Or
ComboBox1.Text = "" Then
Button1.Enabled = False
Else :
Button1.Enabled = True
End If
End Sub
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As
System.Object, ByVal
e As System.EventArgs)
Handles ComboBox1.SelectedIndexChanged
If
TextBox1.Text = "" Or
TextBox2.Text = "" Or
TextBox3.Text = "" Or
ComboBox1.Text = "" Then
Button1.Enabled = False
Else :
Button1.Enabled = True
End If
End Sub
End Class
4.
Double
click pada Form Pengalaman Sepak Bola
Public Class Form4
Private Sub Form4_Load(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
MyBase.Load
End Sub
Private Sub Button1_Click(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
Button1.Click
Form5.Show()
Me.Hide()
End Sub
Private Sub Button2_Click(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
Button2.Click
Form6.Show()
Me.Hide()
End Sub
Private Sub Button3_Click(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
Button3.Click
Form3.Show()
Me.Hide()
End Sub
End Class
5.
Double click pada Form
Pengalaman SSB
Public Class Form5
Private Sub Label2_Click(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
Label2.Click
End Sub
Private Sub Label1_Click(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
Label1.Click
End Sub
Private Sub TextBox1_TextChanged(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
TextBox1.TextChanged
End Sub
Private Sub TextBox2_TextChanged(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
TextBox2.TextChanged
End Sub
Private Sub TextBox5_TextChanged(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
TextBox5.TextChanged
End Sub
Private Sub TextBox7_TextChanged(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
TextBox7.TextChanged
End Sub
Private Sub Button1_Click(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
Button1.Click
Form6.Show()
Me.Hide()
End Sub
Private Sub Button2_Click(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
Button2.Click
Form4.Show()
Me.Hide()
End Sub
Private Sub Form5_Load(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
MyBase.Load
End Sub
End Class
6.
Double click pada Form
Posisi
Public Class Form6
Private Sub Label1_Click(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
Label1.Click
End Sub
Private Sub RadioButton3_CheckedChanged(ByVal sender As
System.Object, ByVal
e As System.EventArgs)
Handles RadioButton3.CheckedChanged
End Sub
Private Sub Label4_Click(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
Label4.Click
End Sub
Private Sub Button2_Click(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
Button2.Click
Form4.Show()
Me.Hide()
End Sub
Private Sub Button1_Click(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
Button1.Click
Form8.Show()
Me.Hide()
End Sub
Private Sub PictureBox2_Click(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
PictureBox2.Click
End Sub
Private Sub RadioButton8_CheckedChanged(ByVal sender As
System.Object, ByVal
e As System.EventArgs)
Handles RadioButton8.CheckedChanged
End Sub
Private Sub Form6_Load(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
MyBase.Load
If
RadioButton1.Checked = True Or
RadioButton2.Checked = True Or
RadioButton3.Checked = True Or
RadioButton4.Checked = True Or
RadioButton5.Checked = True Or
RadioButton6.Checked = True Or
RadioButton7.Checked = True Or
RadioButton8.Checked = True Or
RadioButton9.Checked = True Or
RadioButton10.Checked = True Or
RadioButton11.Checked = True Or
RadioButton12.Checked = True Or
RadioButton13.Checked = True Or
RadioButton14.Checked = True Then
Button1.Enabled = False
Else :
Button1.Enabled = True
End If
End Sub
Private Sub RadioButton1_CheckedChanged(ByVal sender As
System.Object, ByVal
e As System.EventArgs)
Handles RadioButton1.CheckedChanged
End Sub
Private Sub RadioButton14_CheckedChanged(ByVal sender As
System.Object, ByVal
e As System.EventArgs)
Handles RadioButton14.CheckedChanged
End Sub
End Class
7.
Double click pada Form
Selamat Bergabung
Public Class Form7
Private Sub Label1_Click(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
Label1.Click
End Sub
Private Sub PictureBox1_Click(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
PictureBox1.Click
End Sub
End Class
8.
Double click pada Form
Memastikan
Public Class Form8
Private Sub Button2_Click(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
Button2.Click
Form2.Show()
Me.Hide()
End Sub
Private Sub Form8_Load(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
MyBase.Load
End Sub
Private Sub Button1_Click(ByVal
sender As System.Object,
ByVal e As
System.EventArgs) Handles
Button1.Click
Form7.Show()
Me.Hide()
End Sub
End Class
Konsep
Form Online Pendaftaran Sekolah SepakBola
Deskripsi
Pada
program ini terdapat 8 form dengan beberapa pertanyaan yang harus diisi.
Seperti data pribadi, data fisik, pengalaman sepak bola, dan posisi.
Tujuan
Tujuan
dibuatnya program form online pendaftran sekolah sepak bola ini adalah untuk melatih
kita dalam membuat form online pendaftaran menggunakan visual basic juga dapat
digunakan sebagai format pendaftaran baru jika ingin masuk ke sekolah sepak
bola
Manfaat
Manfaat
dari pembuatan form online pendaftaran sekolah sepak bola ini adalah untuk
memudahkan calon siswa dalam mendaftar sekolah.
Sasaran
user
Foem
online pendaftaran sekolah sepak bola ini ditujukan untuk remaja berumur 15-20
tahun yang berminat untuk masuk ke sekolah sepak bola