How can you make a program's button in the taskbar blink? (As a warning message)
Printable View
How can you make a program's button in the taskbar blink? (As a warning message)
in mod:
in a timer...(about 500 or so for the interval)Code:Public Declare Function FlashWindow _
Lib "user32" (ByVal hwnd As Long, _
ByVal bInvert As Long) As Long
Code:a& = FlashWindow(Me.hwnd, 1)
I tried your example, and I am getting the following error:
Compile error:
Wrong number of arguements or invalid property assignment.
OK, so I can't read (or spell for that matter). My mind is not here today. Sorry....
Ok, so I am not getting any errors now, but how can I change the color of the button to another color, such as red?
I believe that has to do with the windows color settings...
it should be pulling the active titlebar color...I think
Correct me if I'm wrong, but the smaller the number ... the faster the button should flash, right? I have changed the number from 1 to 25 to 500, and it always seems to flash at the same rate...about once a minute. Any suggestions...I want it to flash faster.
(Change Public to Private)
Try this:
Code:Private Declare Function FlashWindow Lib "user32" _
(ByVal hWnd As Long, ByVal bInvert As Long) As Long
'True = Flash
'False = No Flash
Private Sub Timer1_Timer()
FlashWindow Form1.hWnd, True
End Sub
Still turns on for a minute, turns off for a minute.
smh, 1 is the fastest you will get with a timer.
Perhaps, a Do...Loop will satisfy your needs?
Code:Private Sub Command1_Click()
Do
FlashWindow Form1.hWnd, True
DoEvents
Loop
End Sub
Thanks
I tried this function. It doesn't work the way I want it to work. This code will make the caption bar of the current form blink.
What I want is the button of the entire application, on Windows' taskbar at the bottom, to flash. How can this be done?
Thanks