sendnotifymessagegetu.pas
来自「Delphi Win32核心API参考光盘源码 本书包含了常用的Windows」· PAS 代码 · 共 57 行
PAS
57 行
unit SendNotifyMessageGetU;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ComCtrls;
type
TForm1 = class(TForm)
Label1: TLabel;
ProgressBar1: TProgressBar;
Label2: TLabel;
private
{ Private declarations }
public
{ Public declarations }
procedure WMClear(var Msg: TWMClear); message WM_CLEAR;
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
{we override the WM_CLEAR message handler to do
something special when received}
procedure TForm1.WMClear(var Msg: TWMClear);
var
iLoop: Integer; // general loop control variable
begin
{turn on some user interface objects}
ProgressBar1.Visible := TRUE;
Label2.Visible := TRUE;
Form1.Repaint;
{animate the progress bar for a short time}
for iLoop := 0 to 100 do
begin
ProgressBar1.Position := iLoop;
Sleep(10);
end;
{turn off the user interface objects}
ProgressBar1.Visible := FALSE;
Label2.Visible := FALSE;
{indicate that the message was processed}
Msg.Result := 1;
end;
end.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?