VB3 How to Create a Flashing Title Bar on a VB FormID: Q71280
|
When calling a Windows API function call, you can create a flashing
window title bar on the present form or any other form for which you
know the handle.
***WARNING: The flash rate should be set based on the caret blink rate.
Then, application users who have epilepsy can control the flash rate so
they don't have a seizure.***
Visual Basic for Windows has the ability to flash the title bar on any
other form if you can get the handle to that form. The function
FlashWindow flashes the specified window once. Flashing a window means
changing the appearance of its caption bar, as if the window were
changing from inactive to active status, or vice versa. (An inactive
caption bar changes to an active caption bar; an active caption bar
changes to an inactive caption bar.)
Typically, a window is flashed to inform the user that the window
requires attention when that window does not currently have the input
focus.
The function FlashWindow is defined as
FlashWindow(hWnd%, bInvert%)
hWnd% - Identifies the window to be flashed. The window can be
either open or iconic.
bInvert% - Specifies whether the window is to be flashed or
returned to its original state. The window is flashed
from one state to the other if the bInvert parameter is
nonzero. If the bInvert parameter is zero, the window
is returned to its original state (either active or
inactive).
' The following Declare statement must appear on one line.
Declare Function FlashWindow% Lib "user" (ByVal hWnd%,
ByVal bInvert%)
Const TRUE = -1
Const FALSE = 0
Sub Form_Load ()
Form2.Show
End Sub
Sub Timer1_Timer ()
Succ% = FlashWindow(Form1.hWnd, 1)
End Sub
Sub Form_GotFocus ()
Timer1.Enabled = False
End Sub
Sub Form_Click ()
Form1.Timer1.Enabled = True
End Sub
Additional query words: 2.00 3.00 vb3only
Keywords : kbcode kbWndw
Version : 1.00 2.00 3.00
Platform : WINDOWS
Issue type :
Last Reviewed: June 22, 1999