📄 frmpubwaitstaticunt.pas
字号:
{ 只显示一个消息等待框 }
unit frmPubWaitStaticUnt;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TfrmPubWaitStatic = class(TForm)
labMsg: TLabel;
private
{ Private declarations }
public
{ Public declarations }
end;
procedure ShowPubWaitStaticDlg(const ACaption: string = '请等待...';
const AMsgText: string = '系统处理中,请等待...'; AWidth: Integer = 399;
AHeight: Integer = 82);
procedure ClosePubWaitStaticDlg;
procedure UpdateWaitStaticCaption(const ACaption: string);
procedure UpdateWaitStaticProgress(const AMsgText: string);
var
frmPubWaitStatic: TfrmPubWaitStatic;
implementation
{$R *.dfm}
procedure ShowPubWaitStaticDlg(const ACaption, AMsgText: string;
AWidth, AHeight: Integer);
begin
if frmPubWaitStatic = nil then
frmPubWaitStatic := TfrmPubWaitStatic.Create(Application);
with frmPubWaitStatic do
begin
Caption := ACaption;
labMsg.Caption := AMsgText;
Show;
end;
Application.ProcessMessages;
end;
procedure ClosePubWaitStaticDlg;
begin
if frmPubWaitStatic <> nil then
with frmPubWaitStatic do
begin
Free;
frmPubWaitStatic := nil;
end;
end;
procedure UpdateWaitStaticCaption(const ACaption: string);
begin
with frmPubWaitStatic do
Caption := ACaption;
Application.ProcessMessages;
end;
procedure UpdateWaitStaticProgress(const AMsgText: string);
begin
with frmPubWaitStatic do
labMsg.Caption := AMsgText;
Application.ProcessMessages;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -