日期:2014-05-18  浏览次数:20772 次

子窗体在父窗体显示
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;
        }
    }