父窗体中有Panel控件(panel上放置别的有用的控件),打开子窗体后,子窗体却会被这个Panel挡住.请问有什么解决方法吗?我试了几种方法都不行,这些控件就像是贴在显示器上的纸片一样,不管子窗体怎么top,都被他挡在后面...注:子窗体的TopMost 已经设为true,Panel置于底层也不行,另外定义一个Panel用来作为子窗体的容器也不行,因为子窗体还需要移动.请高手不吝赐教吧~!
调试欢乐多
ClientPanel.Parent:=nil;
ClientPanel.ParentWindow:=Self.ClientHandle; 这两句话在c#中好像没有办法实现. panel没有ParentWindow这个属性.如果只用第一句,改为才C# 中的this.panel1 .parent = this; panel还是挡住子窗体.
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);
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