4个回答
展开全部
private void button1_Click(object sender, EventArgs e)
{
this.button1.Enabled = false;
}
private void button2_Click(object sender, EventArgs e)
{
this.button1.Enabled = true;
}
{
this.button1.Enabled = false;
}
private void button2_Click(object sender, EventArgs e)
{
this.button1.Enabled = true;
}
展开全部
你这不是送分吗
展开全部
送分
展开全部
禁用控件:
1.将控件隐藏:
在button1的click事件中将button1的可见性设为false
private void button1_Click(object sender, EventArgs e)
{
this.button1.visable= false;
}
然后再button2的click的事件中将button1的可见性设为true
private void button2_Click(object sender, EventArgs e)
{
this.button1.visable = ftrue;
}
2.任然显示控件,但不实现该控件的任何功能,也就是不启用该控件
private void button1_Click(object sender, EventArgs e)
{
this.button1.Enabled = false;
}
在button2的click事件中启用button1
private void button2_Click(object sender, EventArgs e)
{
this.button1.Enabled = true;
}
1.将控件隐藏:
在button1的click事件中将button1的可见性设为false
private void button1_Click(object sender, EventArgs e)
{
this.button1.visable= false;
}
然后再button2的click的事件中将button1的可见性设为true
private void button2_Click(object sender, EventArgs e)
{
this.button1.visable = ftrue;
}
2.任然显示控件,但不实现该控件的任何功能,也就是不启用该控件
private void button1_Click(object sender, EventArgs e)
{
this.button1.Enabled = false;
}
在button2的click事件中启用button1
private void button2_Click(object sender, EventArgs e)
{
this.button1.Enabled = true;
}
本回答被提问者采纳
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询