主题:[讨论]多窗体的问题
我编了一个多窗体的例子 但是,字窗体只能显示一次,
着怎么解决啊
procedure TFormmain.ToolButton1Click(Sender: TObject);
var i:Integer;
begin
for i := 0 to MDIChildCount - 1 do
begin
if (MDIChildren[i] is TFormCheck) then
begin
(MDIChildren[i] as TFormCheck).WindowState := wsMaximized;
(MDIChildren[i] as TFormCheck).Show;
exit; //强制退出过程
end;
end;
FormCheck := TFormCheck.create(nil); //建立子窗体
FormCheck.WindowState := wsMaximized;
StatusBar1.Panels[1].Text :='考勤登记';
end;
着怎么解决啊
procedure TFormmain.ToolButton1Click(Sender: TObject);
var i:Integer;
begin
for i := 0 to MDIChildCount - 1 do
begin
if (MDIChildren[i] is TFormCheck) then
begin
(MDIChildren[i] as TFormCheck).WindowState := wsMaximized;
(MDIChildren[i] as TFormCheck).Show;
exit; //强制退出过程
end;
end;
FormCheck := TFormCheck.create(nil); //建立子窗体
FormCheck.WindowState := wsMaximized;
StatusBar1.Panels[1].Text :='考勤登记';
end;