读书人

子窗体在父窗体显示,该怎么解决

发布时间: 2012-06-05 13:54:06 作者: rapoo

子窗体在父窗体显示
C#中如何自定义窗体显示大小位置,用mdi窗体吗,那又如何使子窗体在指定位置显示,


请各位大侠帮一下忙
在线等答案

[解决办法]

C# code
   private void Form1_Load(object sender, EventArgs e)        {            Point p = new Point(800, 700);            Form2 f = new Form2(p);            f.Show();        }  public partial class Form2 : Form    {        private Point _point;        public Form2()        {            InitializeComponent();        }        public Form2(Point p):this()        {            _point = p;        }        private void Form2_Load(object sender, EventArgs e)        {            this.Location = _point;        }    } 

读书人网 >C#

热点推荐