C#代码设置窗体和Panel的位置大小

1.设置Panel位置大小

private void button2_Click(object sender, EventArgs e)
{
  panel1.Visible = false;
  panel2.Location = new Point(84,52);//设置位置
  panel2.Size = new Size(150,60);
  panel2.Visible = true;
}

2.设置窗体

this.Size = new Size(622, 500);

posted @ 2014-12-05 11:33  fx427103  阅读(5061)  评论(0编辑  收藏  举报