(
private
{ Private declarations }
public
{ Public declarations }
//各個MDI子窗體間通過主窗體定義的公共變量來傳遞數據
str
//標識是哪個子窗體來使用上面
//bomflag=
bomflag:integer;
end;
var
main: Tmain;
implementation
{$R *
uses MaterialsForm
mrphistoryForm;
//
procedure Tmain
var
newform:Tmaterials;
i
begin
//flag=
flag:=
for i:=
begin
// 通過對窗體標題判斷窗體是否存在
if main
begin
//如果窗體已存在
SendMessage(mdichildren[i]
mdichildren[i]
flag:=
//退出循環
break;
end;
end;
//若窗體不存在
[
From:http://tw.wingwit.com/Article/program/Delphi/201311/24956.html