110,538
社区成员
发帖
与我相关
我的任务
分享
Form2 frm = new Form2();
public Form1()
{
InitializeComponent();
this.StartPosition = FormStartPosition.CenterScreen;
frm.Location = new Point(this.Left + this.Width, this.Top);
frm.Show(this);
}
protected override void WndProc(ref Message m)
{
const int WM_MOVE = 0x3;
if (m.Msg == WM_MOVE)
frm.Location = new Point(this.Left + this.Width, this.Top);
base.WndProc(ref m);
}
public Form1()
{
InitializeComponent();
this.StartPosition = FormStartPosition.CenterScreen;
}