LISTING PROGRAM BANGUN RUANG
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
Private Sub
Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
Button2.Click
Close()
End Sub
End Class
Tidak ada komentar:
Posting Komentar