Results 1 to 5 of 5

Thread: [RESOLVED] blink text from status bar

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2002
    Location
    Philippines
    Posts
    877

    Resolved [RESOLVED] blink text from status bar

    how to blink a text from status bar?

    i tried the timer with visible true and false but its not good.

  2. #2
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: blink text from status bar

    what interval did you have for the timer?
    that is the best way, but if your interval is too small, it will barly flicker
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  3. #3
    Smitten by reality Harsh Gupta's Avatar
    Join Date
    Feb 2005
    Posts
    2,938

    Re: blink text from status bar

    VB Code:
    1. Dim isBlank As Boolean
    2. Private Sub Form_Load()
    3.  
    4. Timer1.Interval = 1000
    5. StatusBar1.Panels.Item(1).Text = "Blink"
    6. isBlank = True
    7. Timer1.Enabled = True
    8.  
    9. End Sub
    10.  
    11. Private Sub Timer1_Timer()
    12.  
    13.     If isBlank Then
    14.         StatusBar1.Panels.Item(1).Text = ""
    15.         isBlank = False
    16.     Else
    17.         StatusBar1.Panels.Item(1).Text = "Blink"
    18.         isBlank = True
    19.     End If
    20.    
    21. End Sub
    this should work!!
    Show Appreciation. Rate Posts.

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: blink text from status bar

    Here is how to flash an entire panel in the statusbar.
    VB Code:
    1. Private intPanelToFlash As Integer
    2.  
    3. Private Sub FlashSBPanel(intPanelNo As Integer)
    4. intPanelToFlash = intPanelNo
    5. Timer1.Enabled = True
    6. End Sub
    7.  
    8. Private Sub Timer1_Timer()
    9. Static blnFlash As Boolean
    10. If blnFlash = True Then
    11.     StatusBar1.Panels(intPanelToFlash).Bevel = sbrRaised
    12.     blnFlash = False
    13. Else
    14.     blnFlash = True
    15.     StatusBar1.Panels(intPanelToFlash).Bevel = sbrInset
    16. End If
    17. End Sub
    18.  
    19. Private Sub cmdFlashSBPanel_Click()
    20. Timer1.Enabled = True
    21. FlashSBPanel 1
    22. End Sub
    23.  
    24. Private Sub cmdStopFlash_Click()
    25. Timer1.Enabled = False
    26. StatusBar1.Panels(intPanelToFlash).Bevel = sbrInset
    27. End Sub

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2002
    Location
    Philippines
    Posts
    877

    Re: blink text from status bar

    thanks to all of you guys it works now..

    br

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