423,832 Members | 1,902 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 423,832 IT Pros & Developers. It's quick & easy.

Is there any metthod to run timer tick event when form is hidden in c#.net

P: 2
hi,

I am developing a window application using c#.net.

In the main MDI Form i used a timer, and in timer's tick event i have done some neccessary work.

In this form I also used notifyicon to put application in system tray on minimize, It needed to hide the Form (just like yahoo msgr/google talk).

when application is in maximize state Timer work properly whether it is focused or not, but if application is minimize in system tray, Timer on the form does not work.

I any body know how to run timer event when form is hidden plz suggest.

Jitendra Kumar
Programmer
Protatech India Pvt. Ltd.
May 30 '07 #1
Share this Question
Share on Google+
5 Replies


P: 2
Hi
can you please help me telling how to write a program which would nitify the no of issues from tool using the notifyicon
Nov 3 '08 #2

Plater
Expert 5K+
P: 7,872
I have never heard of this issue, nor have I ever run into it.
My timers function fine regardless of whether they are hidden/visible, minimized/maximized/whatever.
Nov 3 '08 #3

joedeene
100+
P: 583
How are you hiding your form? As Plater said, I don't think it matters how your FormState is, but are you changing your timers interval property or enabled property on the hiding event? That could be a problem, or maybe some properties you need to see a form, like the following...

Expand|Select|Wrap|Line Numbers
  1.  int mynumber = 0;
  2.         private void timer1_Tick(object sender, EventArgs e)
  3.         {
  4.  
  5.             mynumber++;
  6.             numericUpDown1.Value = mynumber;
  7.  
  8.         }
You would need the form to be shown rather than not visible to show the numericUpDown control. Although, that's an example you could be using things that don't require the Form's view...

joedeene
Nov 3 '08 #4

P: 1
Hey Jitendra Kumar,

Did you manage to fix this? I run into the same issue
Oct 31 '17 #5

Frinavale
Expert Mod 5K+
P: 9,731
Hi RobbieVdh,

I have never run into this problem either; that being said, I don't know what type of application you have developed or if there is some sort of odd restriction on timers within it.

Most of my timers are in a dynamic linked library (DLL) that retrieve information from a central database to update in memory objects that then raise Property Changed Notification events to let projects referencing it update accordingly (whether that be in another object or at the GUI).
Nov 6 '17 #6

Post your reply

Sign in to post your reply or Sign up for a free account.