首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > .NET >

兄弟们急呀看看?该怎么处理

2012-04-05 
兄弟们急呀看看??-----------------findform函数vari:integerbeginfori:0tomdichildcountdobeginifmdich

兄弟们急呀看看??
-----------------findform       函数
var
  i:integer;
begin
  for   i:=0   to   mdichildcount   do
  begin
    if   mdichildren[i].caption=caption   then
    begin
      sendmessage(mdichildren[i].handle,wm_syscommand,sc_maximize,0);
      mdichildren[i].enabled:=true;
      mdichildren[i].show;
      mdichildren[i].setfocus;
      break;
    end   else
      result:=false;
  end;
end;

打开窗体时调用

var
  newform:tform2;
begin
  if   findform( '物料主文件维护 ')=false   then
  begin
    newform:=tform2.Create(application);
    newform.Caption:= '物料主文件维护 ';
  end;
end;


效果:菜单栏可以出现,但窗体不可见.也就是说这个子窗体的菜单栏可以出现在主窗体的菜单栏上但是子窗体的窗体不可见看到的是主窗体的窗体不知是怎么回事


[解决办法]
newform:=tform2.Create(application);
newform.Caption:= '物料主文件维护 ';
newform.show;//不show出来怎么能看到窗口

热点排行