求助:怎样避免MDI程序的子窗体重复启动
解决方案 »
- 问个关于ClientDataset的问题!紧急
- 我写了一个函数,在编译时老是提醒有问题,高手帮忙看一下
- pardox如何修复
- 请求帮忙数据库的查询问题! 在线等待!
- 问个简单的字符串处理问题
- 有关Delphi制作的控件问题
- 关于调用DLL中的窗体锁定到另一个窗体的Panel上
- TVideoGrabber连接ipcamera 视频经常中断,
- 请问那一位有货仓货理系统呀?如果编一个这样的系统要多少价钱呢?
- 如何向dos屏幕送一个字符串,像c中的printf
- 还是TREEVIEW!!!!!
- 我用delphi里面的tmediaplayer,播放mid类型的文件的时候, 如何循环播放一个这样的文件!(有点不懂,在次提问!)
begin
form2:=tform2.create(nil);
form2.show;
end;
if form2.HandleAllocated=false then//判断是否已经加载
begin
form2:=tform2.create(nil);
form2.show;
end;
在form2的close事件中写上
action:=cafree;
begin
f_child:=Tf_child.Create(Application);
f_child.BringToFront ;
end
else
f_child.BringToFront ;
h:=findwindow(nil,'form2');
if h<> null then showmessage('the form you have created')
else
application.processmessage;
var
iCount: integer;
begin
//
Result := false;
for iCount := 0 to FrmMain.MDIChildCount - 1 do
begin
if uppercase(AName) = uppercase((FrmMain.MDIChildren[iCount].Name)) then
begin
FrmMain.MDIChildren[iCount].WindowState := wsNormal;
FrmMain.MDIChildren[iCount].BringToFront;
Result := True;
exit;
end;
end;end;
同意 lwk_hlj(披着狼皮的人)
在掉用子窗体时加上
if findchildform('form2')=false {这里是掉用它的自定义函数}
then
begin
application.CreateForm(Tform2,form2);
form2.Show;
end
lwk_hlj(披着狼皮的人)写的是一个自定义函数,我想你应该知道怎么写吧