C#2008 求高手编一段小程序,急求,分多多
http://zhidao.baidu.com/question/155601668.html...
http://zhidao.baidu.com/question/155601668.html
展开
1个回答
展开全部
你在一个窗体上,拖两个按钮 一个timer
private void Form4_Load(object sender, EventArgs e)
{
timer1.Enabled = true;
timer1.Interval = 1000;
timer1.Start();
}
int num = 0;
private void timer1_Tick(object sender, EventArgs e)
{
num++;
if (num % 5 == 0)
{
button1.Visible = false;
}
if (num % 20 == 0)
{
button2.Visible = true;
}
if (num % 25 == 0)
{
button1.Visible = true;
button2.Visible = false;
}
}
private void Form4_Load(object sender, EventArgs e)
{
timer1.Enabled = true;
timer1.Interval = 1000;
timer1.Start();
}
int num = 0;
private void timer1_Tick(object sender, EventArgs e)
{
num++;
if (num % 5 == 0)
{
button1.Visible = false;
}
if (num % 20 == 0)
{
button2.Visible = true;
}
if (num % 25 == 0)
{
button1.Visible = true;
button2.Visible = false;
}
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询