TUTORIAL PROGRAM
PEMBUAT BIDANG



Komponen toolbox yang
digunakan :
No
|
Komponen
|
Properties
|
Keterangan
|
1
|
Form1
|
Name
|
Form1
|
2
|
Label1
|
Name
|
Label1
|
Text
|
Bidang
|
||
3
|
Label3
|
Name
|
Label3
|
Text
|
PROGRAM PEMBUAT BIDANG
|
||
4
|
ComboBox1
|
Name
|
ComboBox1
|
Text
|
Pilih Bidang
|
||
5
|
ComboBox2
|
Name
|
ComboBox2
|
Text
|
Pilih Warna
|
||
6
|
Button1
|
Name
|
Button1
|
Text
|
Buat Bidang
|
||
7
|
Form2
|
Name
|
Form2
|
8
|
OvalShape1
|
Name
|
OvalShape1
|
9
|
Form3
|
Name
|
Form3
|
10
|
OvalShape2
|
Name
|
OvalShape2
|
11
|
Form4
|
Name
|
Form4
|
12
|
OvalShape3
|
Name
|
OvalShape3
|
13
|
Form5
|
Name
|
Form5
|
14
|
RectangleShape1
|
Name
|
RectangleShape1
|
15
|
Form6
|
Name
|
Form6
|
16
|
RectangleShape1
|
Name
|
RectangleShape1
|
17
|
Form7
|
Name
|
Form7
|
18
|
RectangleShape1
|
Name
|
RectangleShape1
|
Kemudian masukkan
listing berikut :
![]() |
Pada Form 1
Public Class Form1
Private Sub
Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
MyBase.Load
Me.ForeColor = Color.White
Me.BackColor = Color.Black
End Sub
Private Sub
Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
Button1.Click
If ComboBox1.Text = "Lingkaran"
And
ComboBox2.Text = "Merah" Then
Form2.Show()
End If
If ComboBox1.Text = "Lingkaran"
And
ComboBox2.Text = "Kuning" Then
Form3.Show()
End If
If ComboBox1.Text = "Lingkaran"
And
ComboBox2.Text = "Hijau" Then
Form4.Show()
End If
If ComboBox1.Text = "Persegi"
And
ComboBox2.Text = "Merah" Then
Form5.Show()
End If
If ComboBox1.Text = "Persegi"
And
ComboBox2.Text = "Kuning" Then
Form6.Show()
End If
If ComboBox1.Text = "Persegi"
And
ComboBox2.Text = "Hijau" Then
Form7.Show()
End If
End Sub
End Class
![]() |
Pada
Form 2
Public Class Form2
Private Sub
Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
MyBase.Load
Me.BackColor = Color.Black
End Sub
End Class
![]() |
Pada Form 3
Public Class Form3
Private Sub
Form3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
MyBase.Load
Me.BackColor = Color.Black
End Sub
End Class
![]() |
Pada Form 4
Public Class Form4
Private Sub
Form4_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
MyBase.Load
Me.BackColor = Color.Black
End Sub
End Class
![]() |
Pada Form 5
Public Class Form5
Private Sub
Form5_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
MyBase.Load
Me.BackColor = Color.Black
End Sub
End Class
![]() |
Pada Form 6
Public Class Form6
Private Sub
Form6_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
MyBase.Load
Me.BackColor = Color.Black
End Sub
End Class
![]() |
Pada Form 7
Public Class Form7
Private Sub
Form7_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
MyBase.Load
Me.BackColor = Color.Black
End Sub
End Class
0 komentar:
Posting Komentar