父窗体中有Panel控件(panel上放置别的有用的控件),打开子窗体后,子窗体却会被这个Panel挡住.请问有什么解决方法吗?我试了几种方法都不行,这些控件就像是贴在显示器上的纸片一样,不管子窗体怎么top,都被他挡在后面...注:子窗体的TopMost 已经设为true,Panel置于底层也不行,另外定义一个Panel用来作为子窗体的容器也不行,因为子窗体还需要移动.请高手不吝赐教吧~!

解决方案 »

  1.   

    父窗体不要放控件,或者给你的子窗体提供Panel的Parent
      

  2.   

    是Widows Form 还是 网页啊?
      

  3.   

    父窗体不要放控件?请问什么意思,那么我的控件怎么办?另外定义一个from来存放吗?"子窗体提供Panel的Parent "这句不太理解,请再详细解释一下可以吗?
      

  4.   

    http://www.cnblogs.com/delphi2007/archive/2008/11/18/1335924.html
      

  5.   

    谢5楼!不过,这好像是delphi的吧.  
          ClientPanel.Parent:=nil;   
          ClientPanel.ParentWindow:=Self.ClientHandle; 这两句话在c#中好像没有办法实现. panel没有ParentWindow这个属性.如果只用第一句,改为才C# 中的this.panel1 .parent = this; panel还是挡住子窗体.
      

  6.   

    有办法解决。。你可以创建一个没有标题的FORM,其他不用我多说了吧:)
      

  7.   

    那样也不行,创建的这个FORM会挡住其它的子窗体,我的意思是说,创建的这个FORM 需要总是在其它MDI子窗体的最后面显示,这点实现不了啊,
      

  8.   

    using System.Runtime.InteropServices;[DllImport("user32")]
    public static extern int SetParent(int hWndChild, int hWndNewParent);  Form2 f2 = new Form2();
      f2.MdiParent = this;
      f2.Show();
      SetParent((int)f2.Handle, (int)this.Handle);
      

  9.   

    using System.Runtime.InteropServices;[DllImport("user32")]
    public static extern int SetParent(int hWndChild, int hWndNewParent);   Form2 f2 = new Form2();
       f2.MdiParent = this;
       f2.Show();
       SetParent((int)f2.Handle, (int)this.Handle);
    方法有效。 
    感谢 liujianghongcc