Im creating a game … I want to add a counter as a clock exactly the same as the Time counter in Microsoft solitair game & i want later when the game is over the time stop and the time reached to be saved in a variable what ever but i want to use this number to generate a scores table.
thanx in advance….
I will post the whole game when its 100% done so you guys can Enjoy 🙂
You could use a Stopwatch object.
Here’s a link on how to use it:
http://msdn.microsoft.com/en-us/library/system.diagnostics.stopwatch.aspx
To start the stopwatch do this:
To stop:
To show time that’s elapsed:
Now you can display the ‘elapsedtime’ string in your strip.
EDIT:
To see moving time, put following in Button click handler to start time:
Now add these two functions & delegate to your forms class: