Hello.
I need to simulate a button click with a Timer. That the action performed by the button, repeats every 60 seconds. I've never use timers, any help?
George_91
0
Newbie Poster
Recommended Answers
Jump to PostJust call the method that defined for button event into timer event method.
private void timer1_Tick(object sender, EventArgs e) { button1_Click( sender, e); }
you also could put null for parameters.
private void timer1_Tick(object sender, EventArgs e) { button1_Click( null, null); …
Jump to PostBetter to use null as both arguments, then passing some Time parameters to button (2nd example from above is the one you need). But only in case when you will not need and parameters from EventArguments, or sender - but I doubt you will need).
Else you can create EventArguments …
All 5 Replies
zid8ne
0
Newbie Poster
VatooVatoo
21
Light Poster
Mitja Bonca
557
Nearly a Posting Maven
VatooVatoo
21
Light Poster
skatamatic
371
Practically a Posting Shark
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.