c# - How to add Timer and add categories to hangman -
i use source code microsoft of hangman here link source code http://code.msdn.microsoft.com/windowsdesktop/hangman-c-version-e0d17f1b/view/sourcecode
and selected c# version
now don't know add timer , categories.
if want add timer form, in visual studio, go toolbox, type timer , timer control appear. drag , drop control on form
timer1 has been added control, visible in bar beneath form
or in code :
public mycontrol() { initializecomponent(); var timer = new timer(); timer.name = "timer1"; controls.add(timer); }
to timer control
public timer timer1 { { return (timer)controls["timer1"]; } }
if want create event:
//beware control must exist!!! timer1.tick += timer1_tick; private void timer1_tick(object sender, eventargs e) { //your code }
Comments
Post a Comment