Link to home
Start Free TrialLog in
Avatar of gusseology
gusseology

asked on

Reset Button

I have a somewhat simple app that does a number of little things.  Part of its function is to setup some parameters, that once entered, enable other buttons and inputs to do other things.

What I want is a reset button that can bring the user back to the beginning as if he just entered the program.

So I created a reset button, that when pushed, kinda manually sets everything back to what it was at the start.  Disabled certain portions, re-enabled other portions, etc.  But its getting kinda hairy doing it that way.

Is there a way to use a reset button's call back to just re-invoke the form.  As in, is there something you can call that re-establishes the app as if you just entered it.  Like, calling Form1 again or something??  Does that make sense?

Also, is there a way to set a DateTime to zero.  When you create a DateTime with no setup parameters, it creates it as Jan 1, 0001 with 0 minutes, 0 seconds, and 0 hours.  What if I have a DateTime variable that got changed and now I want to reinitialize it back to Jan 1, 0001 0 min 0 hour 0sec.

The reason I'm asking this second question in the same posting is because they are related.  If I have to use the reset button to manually re-initialize everything, I'll need to know how to set a DateTime back to 0.

thanks!
ASKER CERTIFIED SOLUTION
Avatar of igor_alpha
igor_alpha

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of gusseology
gusseology

ASKER

great.  works good.