How to use a single timer control across the Forms

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I want to display Time as a label on 3 different forms.
I know that this can be done by putting a timer control on all the 3 Forms.
Is there any way for doing it using a single timer control??

Murthy
 
Use simple inheritance. Put the timer (and maybe even the time label and
the timer logic) in one base Form and have other the 3 inherit from it.
 
.... or create usercontrol which contains Timer + Label, integrate whole
functionality into it, call control something like "TimeControl".

After that, as Chris suggested, use BaseForm for all your three forms.
The base form will automatically create this user control and position it.
 
Back
Top