flashing taskbar in browser app

minckle

Member
Joined
Apr 10, 2006
Messages
6
Programming Experience
Beginner
is there a way to make the taskbar flash when in a browser app???

Im trying to create a helpdesk type browser app. so refresh of the page it will look to see if there are any outstanding enquiries. If there are, i wondered if the taskbar could flash to warn the users?????


any thoughts


thanks??
 
I'm not so sure you could easily make the whole taskbar flash. But you can certainly make the application rectangle inside the taskbar flash. Much like it does when downloads complete etc...

Failing that you could have a popup form display from the task bar, or something like that.
 
hi, yeh thats what i mean, i want the application rectangle in the taskbar to flash.

Do you know any examples which i can look at??

thanks
 
This was slightly more tricky than i had first thought. Apparently the FlashWindowEx API doesn't work so well in .net. Oh well, i played around with it and with a bit of luck and some googling i have come up with this....

VB.NET:
Public Declare Function FlashWindow Lib "user32" (ByVal hwnd As IntPtr, ByVal bInvert As Integer) As Integer 

    Dim Timer As System.Timers.Timer 

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 
        ' Initialise the timer 
        Timer = New System.Timers.Timer() 
        Timer.Interval = 1000 
        Timer.Enabled = False 

        AddHandler Timer.Elapsed, AddressOf FlashWindow 
    End Sub 

    Private Sub FlashWindow(ByVal sender As Object, ByVal e As System.Timers.ElapsedEventArgs) 
    FlashWindow(Me.Handle, 1) 
    End Sub 

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click 
        Timer.Enabled = True 
    End Sub 

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click 
        Timer.Enabled = False 
    End Sub
 
Back
Top