C#主窗口控件盖住子窗口控件,解决方法

来源:互联网 发布:手机互传有哪些软件 编辑:程序博客网 时间:2024/05/16 18:17

C#主窗口控件盖住子窗口控件,解决方法

 

http://topic.csdn.net/u/20090308/16/c87b7e42-2572-456d-bd4c-647719ce6f1c.html?509266204

 

usingSystem.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);

 

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);


 

原创粉丝点击