Results 1 to 3 of 3

Thread: Blinking label

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2000
    Location
    Spain
    Posts
    8

    Post

    I have a label in my form, which I change the color modifying its fontcolor property every second with a timer control.
    The problem is that the label blinks.

    Is there any way of avoiding this to happen??

    Thank you.

    Nauj

  2. #2
    Lively Member
    Join Date
    Oct 1999
    Location
    -
    Posts
    101

    Post

    I have tried to simulate what you did and got no problem. The label turned from yellow to blue without blinking. I have coded something like this:

    Private Sub Timer1_Timer()

    If i = 0 Then
    Label1.ForeColor = &HFF0000 'blue
    i = 1
    Else
    Label1.ForeColor = &HFFFF& 'yellow
    i = 0
    End If

    End Sub

    Also, check the timer's INTERVAL property. The value should be 2000 for two (2) seconds. If you put 2, that means it will change color for every 2 milliseconds.

    Hope this help.

    Cheers,

    Rod

  3. #3
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,176

    Post

    If that doesn't work, try placing the Label within a Picturebox.

    ------------------
    Aaron Young
    Analyst Programmer
    aarony@redwingsoftware.com
    ajyoung@pressenter.com


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