troubleshooting Question

Reset Button

Avatar of gusseology
gusseology asked on
2 Comments1 Solution252 ViewsLast Modified:
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.

Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 2 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros