请问这个代码应写在什么事件里?
if (listBox1.SelectedIndex == -1)
{
button4.Enabled = false;
}
else
{
button4.Enabled = true;
}
另外,form-actived事件处理什么好呢?
if (listBox1.SelectedIndex == -1)
{
button4.Enabled = false;
}
else
{
button4.Enabled = true;
}
另外,form-actived事件处理什么好呢?
FormActived 时间用来处理当前窗口是活动的,也就是标题栏从灰色变为蓝色的时候激发的