c# - How to run the application continously without hanging in background -
have problem in running application continuously without hanging (appending data).
want run code without hanging in background every 5 seconds.
my code is:
public void button1_click(system.object sender, system.eventargs e) { if (button1.text == "start") { timer1.interval = 5000; timer1.enabled = true; button1.text = "stop"; } else if (button1.text == "stop") { timer1.enabled = false; button1.text = "start"; } }
or, can implement windows service, run in background of system without showing explicitly. in main thread can perform required actions 5 second delays.
Comments
Post a Comment