Public Variable Question

  • Thread starter Thread starter Daniel
  • Start date Start date
D

Daniel

What event will reset a public variable that I have set?
I am trying to maintain the username through a public
variable. When I hit stop when debugging it resets the
username. Are there any other events that might reset
that for which I should plan? Or as long as the user does
not happen into debug mode there should be no problem?

Thanks

Daniel
 
It resets only when you stop, so this should not happen in production, but
it does make it hard when developing and debugging. In the final product,
you should not have any unhandled errors, so the issue does not arise.

One workaround is to create another boolean variable. Set it to True in your
initialization routine, and if it's false you need to run init. again.

Another is to use text boxes on a hidden form. If you need a hidden form to
simulate an application close, that's a workable concept.
 
Back
Top