CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    May 2001
    Location
    israel
    Posts
    99

    blinking data on status bar

    hi,

    i want to have a blinking string i my status bar.
    one way to do it is to write and delete the string
    over and over again but it silly.

    is there a smarter/better way to do it?

    ohad.


  2. #2
    Join Date
    Aug 2001
    Posts
    14

    Re: blinking data on status bar

    There may be a function that does it for you, but what you said should get it to do it...

    Call a function or something devoted to that, and set up a do...loop that clears the bar and then starts a timer that lasts a second, then that timer displays the string, then starts another 1 second timer, which then starts the do...loop over (which reclears bar and then goes thru again ...).

    You probably were thinking that too... but just to clarify.

    -Picky


  3. #3
    Join Date
    Apr 2000
    Location
    South Carolina,USA
    Posts
    2,210

    Re: blinking data on status bar

    Use The visible property of the containing control.
    if the string is a Label then Label.Visible = True/False will make it display then disappear. Of cource you will need to use something like a timer.
    Here is a simple sample program.
    Start a new project. Add a timer and a label to it then paste this code into the general declarations section of the form. Run it

    option Explicit
    private Sub Form_Load()
    Timer1.Interval = 200
    Timer1.Enabled = true
    Label1.Caption = "This is a Blinking Label"
    End Sub

    private Sub Timer1_Timer()
    Label1.Visible = Not Label1.Visible
    End Sub






    John G

  4. #4
    Join Date
    Jun 2001
    Location
    Israel
    Posts
    228

    Re: blinking data on status bar

    Hi,
    i actually had an opposite problem, i wanted it to stop blinking on frequent update. ;(
    You don't have to "delete" the string if you want blinking, u can just set the text/caption property to the same value using a do..loop.
    ofcourse this is at least as stupid as the other suggestions...

    ----------
    The @host is everywhere!
    ----------

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

Featured