Click here to Skip to main content
15,903,175 members
Home / Discussions / C#
   

C#

 
GeneralRe: Coordinates problem Pin
molesworth22-May-09 1:38
molesworth22-May-09 1:38 
Questioncreate Timers dynamically Pin
Member 305788721-May-09 23:50
Member 305788721-May-09 23:50 
AnswerRe: create Timers dynamically Pin
musefan22-May-09 0:03
musefan22-May-09 0:03 
GeneralRe: create Timers dynamically Pin
Member 305788722-May-09 0:25
Member 305788722-May-09 0:25 
GeneralRe: create Timers dynamically Pin
musefan22-May-09 0:31
musefan22-May-09 0:31 
GeneralRe: create Timers dynamically Pin
DaveyM6922-May-09 0:43
professionalDaveyM6922-May-09 0:43 
GeneralRe: create Timers dynamically Pin
musefan22-May-09 0:46
musefan22-May-09 0:46 
AnswerRe: create Timers dynamically Pin
DaveyM6922-May-09 0:18
professionalDaveyM6922-May-09 0:18 
You can cast to a Timer from the sender
if(sender is System.Timers.Timer)
{
    System.Timers.Timer thisTimer = sender as System.Timers.Timer;
}
If you want you can give it a property such as an int for ID or a string for Name etc by subclassing e.g.
public class MyTimer : System.Timers.Timer
{
    public string Name
    {
        get;
        set;
    }
}
... and then use MyTimer instead of Timer.

Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
Why are you using VB6? Do you hate yourself? (Christian Graus)

GeneralRe: create Timers dynamically Pin
Member 305788722-May-09 4:47
Member 305788722-May-09 4:47 
GeneralRe: create Timers dynamically Pin
DaveyM6922-May-09 6:23
professionalDaveyM6922-May-09 6:23 
GeneralRe: create Timers dynamically Pin
mell mell28-Dec-18 6:24
mell mell28-Dec-18 6:24 
Questioni cant get a class i made- description inside- win app Pin
dinbrca3521-May-09 23:35
dinbrca3521-May-09 23:35 
AnswerRe: i cant get a class i made- description inside- win app Pin
musefan21-May-09 23:58
musefan21-May-09 23:58 
Questiondatagridview column Pin
michaelgr121-May-09 23:28
michaelgr121-May-09 23:28 
AnswerRe: datagridview column Pin
Mycroft Holmes21-May-09 23:48
professionalMycroft Holmes21-May-09 23:48 
GeneralRe: datagridview column Pin
michaelgr122-May-09 1:42
michaelgr122-May-09 1:42 
GeneralRe: datagridview column Pin
Mycroft Holmes22-May-09 2:45
professionalMycroft Holmes22-May-09 2:45 
QuestionSecurity "string" encrypt Pin
evangile21-May-09 22:56
evangile21-May-09 22:56 
AnswerRe: Security "string" encrypt Pin
musefan21-May-09 23:08
musefan21-May-09 23:08 
GeneralRe: Security "string" encrypt Pin
evangile21-May-09 23:14
evangile21-May-09 23:14 
GeneralRe: Security "string" encrypt Pin
DaveyM6921-May-09 23:17
professionalDaveyM6921-May-09 23:17 
GeneralRe: Security "string" encrypt Pin
evangile21-May-09 23:23
evangile21-May-09 23:23 
GeneralRe: Security "string" encrypt Pin
DaveyM6921-May-09 23:37
professionalDaveyM6921-May-09 23:37 
GeneralRe: Security "string" encrypt Pin
musefan21-May-09 23:25
musefan21-May-09 23:25 
GeneralRe: Security "string" encrypt Pin
evangile21-May-09 23:53
evangile21-May-09 23:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.