I have this code in Timer1:
vb Code:
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick Dim a As Integer Dim b As Integer a = Label2.Text b = 1 Label2.Text = a - b If Label2.Text = "-1" Then Timer1.Stop() 'Stop timer, no more numbers PictureBox2.Visible = True Timer2.Stop() 'Stop timer, ENDED 10 SECONDS Label6.ForeColor = Color.Red Label7.ForeColor = Color.Green Label2.Text = "15" 'Starting 15 seconds countdown Timer1.Start() Timer3.Start() End If End Sub
I want that if the number in the label2 (coundown) is <=9 the position will be "224, 28" else "211, 28".
I added this code in all possible locations but it didn't seem to work..
vb Code:
If Label2.Text <= 9 Then Label2.Location = New Point(224, 28) Else Label2.Location = New Point(211, 28) End If
Pictures:
Right position:
Wrong position with all numbers > 9:
Help me.
Thank you.






Reply With Quote