代替showmodal其他两种方法
2006-02-04 13:28:19 来源:WEB开发网核心提示:PRocedure TForm1.Button1Click(Sender: TObject);beginenablewindow(handle,false);//窗口一不可用form2.show;end;procedure TForm2.FormClose(Sender: TObject; var Action: TC
PRocedure TForm1.Button1Click(Sender: TObject);
begin
enablewindow(handle,false);//窗口一不可用
form2.show;
end;
procedure TForm2.FormClose(Sender: TObject; var Action: TCloseAction);
begin
enablewindow(form1.handle,true);//可用
end;
或者
var
Form1: TForm1;
WindowList: Pointer;
implementation
uses Unit2;
{$R *.DFM}
procedure TForm1.Button1Click(Sender: TObject);
begin
WindowList:= DisableTaskWindows(self.handle);
form2.show;
end;
uses Unit1;
{$R *.DFM}
procedure TForm2.FormClose(Sender: TObject; var Action: TCloseAction);
begin
EnableTaskWindows(unit1.WindowList);
end;
更多精彩
赞助商链接