Windows Form application C# stops responding in between timer tick events -


i have code in have started timer tick event of 75 sec. application supposed perform task, @ time interval of 75 sec. application runs fine 5 hrs, of sudden shows not responding...whenever other operations done on computer opening other files...

my code looks this:

private void button2_click(object sender, eventargs e) {                 tmrtimer.enabled = true; }  private void tmrtimer_tick(object sender, eventargs e) {     //do stuff here; } 

i think maybe because used timer system.windows.forms.timer class. kind of timers single thread timers; means use same thread ui use. so, it's obvious why application shows not responding when thread has lots of things do.
suggest change timer type , try one: system.threading.timers.


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -