你查以前的帖子,肯定能找到答案
定义两个过程
HideNoWaitDlg;
ShowNoWaitDlg ;
执行前调用第一个过程,显示等待画面,执行后调用第二个过程,清除画面
procedure Tcgtj0.ShowNoWaitDlg ;
begin
if not Assigned(MyNoWaitWnd) then
MyNoWaitWnd := THintWindow.Create(self);
MyNoWaitWnd.Brush.Color :=clLtGray;
MyNoWaitWnd.Canvas.Font.Color:=clGreen;
MyNoWaitWnd.Canvas.Font.Size:=12;
MyNoWaitWnd.Canvas.Font.Name:='宋体';
MyNoWaitWnd.ActivateHint(Rect(300, 350, 700, 400),'Now Wait...');
MyNoWaitWnd.Canvas.TextOut(60,20,'正在统计,请稍等。。。');
end;
procedure Tcgtj0.HideNoWaitDlg ;
begin
MyNoWaitWnd.ReleaseHandle;
end;