| Rachel Fairfield (1) | |||
|
Hey all, I have been programming C++ for some time, but I am relatively new to Windows Forms. I know how to start and stop a timer with timer1.Start() and timer1.Stop() but what I really need is the value in between! From the minute a user clicks a button (button1_Click) the timer starts, and when a set of conditions is fulfilled (i.e. If condition1 == 1 && condition2 == 2) then the timer stops and prints out. I have the entire program figured out, except for this one little thing. Help out? Thanks! Edit: Figured it out on my own ... guess nobody comes on here anymore. Took 3 hours haha. Here's the solution for those who were wondering: I ditched the Start/Stop and instead deleted the timer all together. I initialized three DateTime variables (Start, End, and Total). ***
| |||
|
Last edited on
|
|||