C# MDI 子窗体被父窗体Panel挡住
父窗体上有Panel控件(panel上放置别的有用的控件),打开子窗体后,子窗体却会被这个Panel挡住.请问有什么解决方法吗?
当我把Panel控件去掉后,子窗口也是位于父窗口的下面,已经把TopMost属性置为true,但还是位于下面,怎么破?
网上使用如下方法可以解决:
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);
我试了一下,怎么就不行咧?
[DllImport("user32")]
public static extern int SetParent(int hWndChild, int hWndNewParent);
这两句是干啥子的?不太懂,菜鸟一枚,望解答。。。