Added: Apr 28, 2002
Snippet uploaded by: snippet
Written By: unknown
Demo: Sorry, no demo
Windows API Guide: FlashWindow Function Platforms: Win 32s, Win 95/98, Win NT FlashWindow flashes a window one step. Flashing is where the title bar of the window is switched from an active to inactive look (or vice versa) to get the user's attention. Normally this is done multiple times, instead of just once. When you are done flashing, be sure to call the function again, this time with bInvert set to 0. The function returns 0 if the window's look was inactive before flashing, or 1 if its look was active. hwndThe handle of the window to flash one step. bInvertSpecifies how to flash. If non-zero, switches the title bar from an active to inactive look (or vice versa). If zero, restores the window to its normal look.
Highlight all by clicking in box
Declare Function FlashWindow Lib "user32.dll" (ByVal hwnd As Long, ByVal bInvert As Long) As Long
' Flash Form1 five times to get the user's attention
Dim c As Integer, retval As Long ' counter variable & return value
For c = 1 To 10 ' flash on five times, off five times
retval = FlashWindow(Form1.hWnd, 1) ' toggle the look of the window
Sleep 500 ' halt execution for 500 milliseconds (1/2 minute)
retval = FlashWindow(Form1.hWnd, 0)
' make sure the window looks normal;
No Comments to show
Please completely fill out the form below if you want to review this snippet. All reviews are subject to validation.
Adding your comment. Please wait...
Thanks for adding your comment!. After further review it will be added.
There was a problem adding your comment. Please try again.
Please complete all the fields in the form before sending.