Results 1 to 8 of 8

Thread: [RESOLVED] Align Text after certain amount (CountDown)

Threaded View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2010
    Posts
    101

    Resolved [RESOLVED] Align Text after certain amount (CountDown)

    I have this code in Timer1:
    vb Code:
    1. Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
    2.         Dim a As Integer
    3.         Dim b As Integer
    4.         a = Label2.Text
    5.         b = 1
    6.         Label2.Text = a - b
    7.         If Label2.Text = "-1" Then
    8.             Timer1.Stop() 'Stop timer, no more numbers
    9.             PictureBox2.Visible = True
    10.             Timer2.Stop() 'Stop timer, ENDED 10 SECONDS
    11.             Label6.ForeColor = Color.Red
    12.             Label7.ForeColor = Color.Green
    13.             Label2.Text = "15" 'Starting 15 seconds countdown
    14.             Timer1.Start()
    15.             Timer3.Start()
    16.         End If
    17.     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:
    1. If Label2.Text <= 9 Then
    2.                 Label2.Location = New Point(224, 28)
    3.             Else
    4.                 Label2.Location = New Point(211, 28)
    5.             End If

    Pictures:
    Right position:


    Wrong position with all numbers > 9:




    Help me.
    Thank you.
    Last edited by Acrobater; Oct 16th, 2010 at 02:19 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width