2013-10-27
展开全部
修改控件的Top和Left属性就可以移动控件,如:
/*
窗体需要2个按钮(Button),一个标签(Label)控件
*/
private void button1_Click(object sender, EventArgs e)
{
this.Label1.Left = 0;
this.Label1.Top = 0;
}
private void button2_Click(object sender, EventArgs e)
{
this.Label1.Left = 100;
this.Label1.Top = 100;
}
/*
窗体需要2个按钮(Button),一个标签(Label)控件
*/
private void button1_Click(object sender, EventArgs e)
{
this.Label1.Left = 0;
this.Label1.Top = 0;
}
private void button2_Click(object sender, EventArgs e)
{
this.Label1.Left = 100;
this.Label1.Top = 100;
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询