如何编写代码C#WinForm窗体实现每隔一分钟就自动进入一个网站
如何编写代码C#WinForm窗体实现每隔一分钟就自动进入一个网站。求解。最好的是带整个代码程序 --------------------编程问答-------------------- 设置Timer的Interval 为一分钟this.timer1.Interval = 1000 * 60;
--------------------编程问答-------------------- 楼主 千万别做坏事啊 --------------------编程问答-------------------- System.Timers.Timer Timers_Timer = new System.Timers.Timer();
private void timer1_Tick(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("http://www.baidu.com");
}
Timers_Timer.Interval = 60000;
Timers_Timer.Elapsed += new System.Timers.ElapsedEventHandler(Timers_Timer_Elapsed);
System.Diagnostics.Process.Start("http://www.baidu.com");
--------------------编程问答-------------------- System.Timers.Timer Timers_Timer = new System.Timers.Timer();
Timers_Timer.Interval = 60000;
Timers_Timer.Elapsed += new System.Timers.ElapsedEventHandler(Timers_Timer_Elapsed);
void Timers_Timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
System.Diagnostics.Process.Start("http://www.baidu.com");
} --------------------编程问答-------------------- --------------------编程问答-------------------- 学习了 --------------------编程问答-------------------- 1楼的办法可以
还有种办法就是用线程
控制Threed.Sleep=1000*60; --------------------编程问答--------------------
+++ --------------------编程问答-------------------- 用线程或者Timer都可以 --------------------编程问答--------------------
private void Form1_Load(object sender, EventArgs e)
{
timer1.Start();
timer1.Interval = 6000;
}
private void timer1_Tick(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("www.baidu.com");
} --------------------编程问答--------------------
1楼解答了~~~~ --------------------编程问答-------------------- 用Timer然后
System.Diagnostics.Process.Start("www.baidu.com");
补充:.NET技术 , C#