0% found this document useful (0 votes)
20 views5 pages

Examen Dilmar 2 Visual

The document describes code for a program with buttons and timers that control the visibility of different shapes on a form. Clicking different buttons starts different timers that toggle the visible property of various oval and rectangle shapes.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views5 pages

Examen Dilmar 2 Visual

The document describes code for a program with buttons and timers that control the visibility of different shapes on a form. Clicking different buttons starts different timers that toggle the visible property of various oval and rectangle shapes.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

ublic Class Form1

Dim a, b As Integer
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
a = 0
b = 0
Timer1.Enabled = True
Timer1.Interval = 10000
End Sub

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Timer1.Tick
a = a + 1
b = b + 1

Label1.Text = b

OvalShape1.Visible = False
OvalShape2.Visible = True
OvalShape3.Visible = True
OvalShape5.Visible = True
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button2.Click
a = 0
b = 0
OvalShape1.Visible = True
OvalShape1.Visible = False
Timer2.Enabled = True
Timer2.Interval = 10000
End Sub

Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Timer2.Tick
OvalShape1.Visible = False
OvalShape1.Visible = True
RectangleShape1.Visible = True
OvalShape4.Visible = True
OvalShape2.Visible = False
OvalShape3.Visible = False
OvalShape5.Visible = False
End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button3.Click
a = 0
b = 0
OvalShape1.Visible = True
OvalShape1.Visible = False
Timer3.Enabled = True
Timer3.Interval = 10000
End Sub

Private Sub Timer3_Tick(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Timer3.Tick
OvalShape1.Visible = False
OvalShape1.Visible = True
OvalShape6.Visible = True
RectangleShape2.Visible = True
RectangleShape3.Visible = True
OvalShape2.Visible = False
OvalShape3.Visible = False
OvalShape5.Visible = False
RectangleShape1.Visible = False
OvalShape4.Visible = False
End Sub
End Class

You might also like