Clear form

  • Thread starter Thread starter Rich
  • Start date Start date
R

Rich

Is there a method that will reset all controls and
variables used on a form so that the next time it is
opened in the same session everything will be
reinitialized so that each item dosen't have to be
cleared and/or nulled upon closing?
 
Is there a method that will reset all controls and
variables used on a form so that the next time it is
opened in the same session everything will be
reinitialized so that each item dosen't have to be
cleared and/or nulled upon closing?


You can always reinstantiate the form (and dispose of the previous
instance) instead of using "hide".
 
Rich said:
Is there a method that will reset all controls and
variables used on a form so that the next time it is
opened in the same session everything will be
reinitialized so that each item dosen't have to be
cleared and/or nulled upon closing?

Close the form by calling its 'Close' method and reshow it by creating a
new instance:

\\\
Call(New Form1()).Show()
///
 
Back
Top