In your application, you may want to carry out the application's title bar flashes to alert users to a certain operation, this article describes how to make a window's title bar to flash.
Flashing title bar of a window means changing the appearance of its title bar, for example, becomes inactive it from activities or activities into the activities and so never. As long as you can in Delphi or C + + Builder to get the window handle, you can use the Windows application programming interface (API) function to make the window's title bar to flash. Function FlashWindows can be used to make a particular window flashing one.
Function prototype:
function FlashWindow (const hwnd: Integer; const bInvert: LongBool): LongBool;
The function requires two parameters, first parameter is to flash the title bar of the window handle, the second parameter is used to specify settings window flashing state, or to restore its original state. If the bInvert parameter True, it indicates that the window's title bar is flashing, if the parameter is False, then the window's title bar that has been restored to its original state.
The value returned by the function call to the function used to specify the state before the window, if the return value is True, it indicates that the function is called before the window is active, otherwise, if the return value is False, then that function is called before the window non- activities.
When using the FlashWindow function, a better method is to flash the title bar off frequency is set to the same character (ie the blinking cursor) the same character flashing off frequency can be obtained by calling the function GetCaretBlinkTime to. To use this function, you need to declare the following statements is included in your general declarations section of the form:
function GetCaretBlinkTime: Integer;
The function returns the value of that time with a millisecond. Example: Create a new Project, and the new one From (including the New
Project created Form, a total of two), in the Form1 to add a Button and Timer, according to the following method to establish procedures.
procedure TForm1.Button1Click (Sender: TObject);
begin
Form2.Show;
Form1.BringToFront;
Timer1.Interval: = GetCaretBlinkTime;
Timer1.Enabled: = Not Timer1.Enabled;
end;
procedure TForm1.Timer1Timer (Sender: TObject);
begin
FlashWindow (Form2.Handle, TRUE);
end;
Recommended links:
Registry combat COLLECTION - "Operation" Change Collection
resolving MEMORY card locked error in canon
ZEBEXZ-1071BT hot promotions
Planning red boiler out of the discrete uniform
MTS to AVI
Niuhong Hong: the explosion of crack SONY battery FANS
Reviews Recreation
DAT TO 3GP
P2P operators TRANSFORM their billing through traffic into the regular army
DivX to ZUNE
Audio Rippers And Converters Expert
CCTV AFFECTED by exposure Baidu shares down 25%
Job 10 kinds of unhealthy attitude towards students
Shop Online Gaming
Evaluation Remote Computing
Magic Assistant: can not control the computer keystrokes
Mars V2.7.2 latest version of the text INPUT text input easy Fun
No comments:
Post a Comment