ANALISIS
PROGRAM BANGUN DUA DIMENSI
No.
|
Komponen
|
Properties
|
Keterangan
|
1.
|
Form 1
|
Name
Text
|
Form 1
|
2.
|
Label 1
|
Name
Text
|
Label 1
Bangun Datar
|
3.
|
Label 2
|
Name
Text
|
Label 2
Warna
|
4.
|
Button 1
|
Name
Text
|
Button 1
Lihat
|
5.
|
Combo Box 1
|
Name
Text
|
Combo Box 1
Persegi
Lingkaran
|
6.
|
Combo Box 2
|
Name
Text
|
Combo Box 2
Merah
Kuning
Hijau
|
7.
|
Oval Shape 3
|
Name
|
Oval Shape
|
LISTING
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Me.Text = "BERMAIN DAN BELAJAR"
If ComboBox1.Text = "" And
ComboBox2.Text = "" Then
RectangleShape1.Hide()
RectangleShape2.Hide()
RectangleShape3.Hide()
OvalShape1.Hide()
OvalShape2.Hide()
OvalShape3.Hide()
End If
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
If ComboBox1.Text = "PERSEGI" And
ComboBox2.Text = "MERAH"
Then
RectangleShape1.Visible = True
RectangleShape2.Visible = False
RectangleShape3.Visible = False
OvalShape1.Visible = False
OvalShape2.Visible = False
OvalShape3.Visible = False
ElseIf ComboBox1.Text = "PERSEGI" And
ComboBox2.Text = "KUNING"
Then
RectangleShape1.Visible = False
RectangleShape2.Visible = True
RectangleShape3.Visible = False
OvalShape1.Visible = False
OvalShape2.Visible = False
OvalShape3.Visible = False
ElseIf ComboBox1.Text = "PERSEGI" And
ComboBox2.Text = "HIJAU" Then
RectangleShape1.Visible = False
RectangleShape2.Visible = False
RectangleShape3.Visible = True
OvalShape1.Visible = False
OvalShape2.Visible = False
OvalShape3.Visible = False
ElseIf ComboBox1.Text = "LINGKARAN" And
ComboBox2.Text =
"MERAH" Then
RectangleShape1.Visible = False
RectangleShape2.Visible = False
RectangleShape3.Visible = False
OvalShape1.Visible = True
OvalShape2.Visible = False
OvalShape3.Visible = False
ElseIf ComboBox1.Text = "LINGKARAN" And
ComboBox2.Text = "KUNING" Then
RectangleShape1.Visible = False
RectangleShape2.Visible = False
RectangleShape3.Visible = False
OvalShape1.Visible = False
OvalShape2.Visible = True
OvalShape3.Visible = False
ElseIf ComboBox1.Text = "LINGKARAN" And
ComboBox2.Text = "HIJAU" Then
RectangleShape1.Visible = False
RectangleShape2.Visible = False
RectangleShape3.Visible = False
OvalShape1.Visible = False
OvalShape2.Visible = False
OvalShape3.Visible = True
End If
End Sub
End Class
Tidak ada komentar:
Posting Komentar