-
I'm sure I've seen this before but I can't for the life of me remember how. I have a program running in the background that beeps users to notify them of a certain event. When this happens I would also like the app's button in the taskbar to flash or at least change color.
Any ideas?
thanks
Ash
-
Add the following code into your program & it solve you question...
Option Explicit
Private Declare Function FlashWindow Lib "user32" (ByVal hwnd As Long, ByVal bInvert As Long) As Long
Private Declare Sub Sleep Lib "kernel32.dll" (ByVal dwMilliseconds As Long)
Private Sub Command1_Click()
Dim R&, Cnt%
For Cnt% = 1 To 50
DoEvents
Form1.Caption = "Flash " & Cnt%
R& = FlashWindow(Form1.hwnd, 1)
Sleep 500
Next
End Sub
__________________________
Chris.C :D
[email protected]
Software Engineer