在您的创建子窗口的事件中加入如下代码:
private
index:shortint;
...
var
tempmenu:tmenuitem;
begin
tempmenu:=tmenuitem.create(self);
tempmenu.caption:=newform.caption;
index:=tempmenu.menuindex;
window.add(tempmenu);
end;
在子窗口的关闭事件中删除相应的子菜单项
private
index:shortint;
...
var
tempmenu:tmenuitem;
begin
tempmenu:=tmenuitem.create(self);
tempmenu.caption:=newform.caption;
index:=tempmenu.menuindex;
window.add(tempmenu);
end;
在子窗口的关闭事件中删除相应的子菜单项
其它不要任何代码。