小说网 找小说 无限小说 烟雨红尘 幻想小说 酷文学 深夜书屋

delphi子窗体重复打开问题解决方法

delphi子窗体重复打开问题解决方法

 

 

procedure? TfrmMainForm.OpenForm(FormClass: TFormClass; var fm; AOwner:TComponent);
var
i: integer;
Child:TForm;
begin
for i := 0 to Screen.FormCount -1 do
if Screen.Forms[i].ClassType=FormClass then
begin
Child:=TForm(Screen.Forms[i]);
if Child.WindowState=wsMinimized then
ShowWindow(Child.handle,SW_SHOWNORMAL)
else
ShowWindow(Child.handle,SW_SHOWNA);
if (not Child.Visible) then Child.Visible:=True;
Child.BringToFront;
Child.Setfocus;
TForm(fm):=Child;
exit;
end;
Child:=TForm(FormClass.NewInstance);
TForm(fm):=Child;
Child.Create(application);
end;

 

 

 

//OpenForm(FFormClassList[aindex],aForm,nil); //可不重复打开窗体

 

delphi 子窗体最大化

delphi 抓取网页内容的程序

打开网页 DELPHI

delphi 用户登录 代码

delphi 显示数据

posted on 2009-08-11 14:53  王峰炬  阅读(247)  评论(0编辑  收藏  举报

导航