1:用timer控件的函数
procedure TForm1.Timer1Timer(Sender: TObject);
var
AHandle: THandle;
begin
AHandle := FindWindow('TMessageForm', PChar(Application.Title));
if AHandle > 0 then
SendMessage(AHandle, WM_CLOSE, 0, 0);
end;
2:自己在写个新的窗体
转载于:https://www.cnblogs.com/xunxun/archive/2010/12/31/1922861.html