在一个MDI中,如何通过一个按纽来关闭所有已经打开的窗体(主窗体除外)。
注:其它打开的窗体并不是MDI的子窗体。
注:其它打开的窗体并不是MDI的子窗体。
解决方案 »
- dbexpress 批量更新图片
- 关于怎么用decision cube组件?
- 请问怎么在DELPHI执行 HTML文件但不要打开(显示) 这个 HTML文件
- Very 急 , 有关于DBGrid的显示问题(正确的就马上结)
- 我用了一条这样的语句 j:=table1.recordcount; 为什么j得不到值????
- 请问大家在南京做程序员工资一般一个月都有多少呀!(我明年打算过去)
- (好不容易进来啊)这是围绕我一天的问题,开发WEB APP的高手进,PLEASE!
- 在64位系统上部署BDE的要点
- 我用DBNavigator添加一条记录后想在提交前检查当前记录是否为空数据?
- 怎么读取:后的文字?比如edit1.text等于8:eight,我想让Edit2.text等于eight,不要冒号与前面的8,这要怎么编?
- 怎样使用readfile函数?
- 为什么每个字段结尾都有一个奇怪的符号?
var
i : Integer;
begin
for i:= 0 to Application.ComponentCount -1 do
if Application.Components[i] is TForm then begin
if Application.Components[i]<>Application.MainForm then
TForm(Application.Components[i]).Close; //or free
end;end;
var i:integer;
begin
for i:=0 to FrmMain.MDIChildCount-1 do
begin
if frmMain.MDIChildren[i].Active then
FrmMain.MDIChildren[i].Close;
end;
end;
var
i : Integer;
begin
for i:= 0 to Application.ComponentCount -1 do
if Application.Components[i] is TForm then begin
if Application.Components[i]<>Application.MainForm then
TForm(Application.Components[i]).Close; //or free
end;end
i:integer;
begin
for i:=0 to screen.FormCount-1 do
if screen.Forms[i]<>application.MainForm then
screen.Forms[i].Close;
end;
************************************
那这些窗体是不是你所说的“主窗体”所属程序创建的呢? ________________________欢迎访问和宣传我的论坛http://hthunter.vicp.net/