如何让winform在屏幕中给定的地方生成出来?
比如运行后在屏幕坐标(500,500)的地方。

解决方案 »

  1.   


            protected override void OnLoad(EventArgs e)
            {
                this.Left = 500;
                this.Top = 500;
                base.OnLoad(e);
            }
      

  2.   

    楼上正解 this.Top=500;this.Left=500;
      

  3.   

    1楼正解,2楼蹭分,嘎嘎但是最简单的方法不是重写,而是如下操作选中你的窗体,然后点击属性栏的事件(就是那个闪电标志),然后选择Load,双击它就会进入代码模式。
    然后在代码模式中写入:
    this.Left=500;
    this.Top=500;这就搞定了
      

  4.   

    Form f =new Form();
    f.Location=new Point(x,y);

    this.Left=500;
    this.Top=500;
      

  5.   

    在窗体的OnLoad事件中加入代码:
    this.Left=500;
    this.Top=500;
      

  6.   

    设置窗体显示位置属性为手动,然后用代码来设置
    this.Location = new Point(500,500);
      

  7.   

    this.Location = new Point(500,500);