469,643 Members | 1,427 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,643 developers. It's quick & easy.

C# App - Simultaneous, Multiple Timers; Accessing

1
Hi there, I'm currently working on a C# application that deals with dynamically created TabPages based (each TabPage represents a file that has been opened).

On each TabPage there is a DataGridView control as well as some other items including a Button whose purpose is to start/stop a timer clock of sorts. The main problem here is that all of my controls are dynamically generated, so if there were 3 TabPages open, there would be 3 different Button controls saying "Start/Stop Timer", each one with a unique .Name property based on the filename. So, I can reference these controls easily using methods to locate these controls.

However, when it comes to creating Timer controls for each of these TabPages, there is no .Name property or any other way in which I can reference these controls short of having the variable name be an actual variable (which I don't know if that can be done in C# or not). I can't really use 1 timer because I want them to be able to run simultaneously.

So, I'm wondering what the best way would be to go about gaining access to these multiple Timers if I were to create them dynamically. I do know that I could be going about this all wrong, so if there's a better algorithmic approach than dynamically creating controls for each TabPage feel free to tell me.

Thanks a lot!
Jan 1 '08 #1
0 1433

Post your reply

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

Similar topics

6 posts views Thread by Jimnbigd | last post: by
6 posts views Thread by Gene Hubert | last post: by
1 post views Thread by Bamse | last post: by
2 posts views Thread by cntams | last post: by
5 posts views Thread by FredC | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.