how to blink a text from status bar?
i tried the timer with visible true and false but its not good.
Printable View
how to blink a text from status bar?
i tried the timer with visible true and false but its not good.
what interval did you have for the timer?
that is the best way, but if your interval is too small, it will barly flicker
this should work!!VB Code:
Dim isBlank As Boolean Private Sub Form_Load() Timer1.Interval = 1000 StatusBar1.Panels.Item(1).Text = "Blink" isBlank = True Timer1.Enabled = True End Sub Private Sub Timer1_Timer() If isBlank Then StatusBar1.Panels.Item(1).Text = "" isBlank = False Else StatusBar1.Panels.Item(1).Text = "Blink" isBlank = True End If End Sub
Here is how to flash an entire panel in the statusbar.VB Code:
Private intPanelToFlash As Integer Private Sub FlashSBPanel(intPanelNo As Integer) intPanelToFlash = intPanelNo Timer1.Enabled = True End Sub Private Sub Timer1_Timer() Static blnFlash As Boolean If blnFlash = True Then StatusBar1.Panels(intPanelToFlash).Bevel = sbrRaised blnFlash = False Else blnFlash = True StatusBar1.Panels(intPanelToFlash).Bevel = sbrInset End If End Sub Private Sub cmdFlashSBPanel_Click() Timer1.Enabled = True FlashSBPanel 1 End Sub Private Sub cmdStopFlash_Click() Timer1.Enabled = False StatusBar1.Panels(intPanelToFlash).Bevel = sbrInset End Sub
thanks to all of you guys it works now.. ;)
br