Quantcast
Channel: Windows Forms General forum
Viewing all articles
Browse latest Browse all 12583

Dialog box (re) initialisation

$
0
0

When you Close() a dialog box, it doesn't really go away, it just hides itself so the the calling application can still  access the fields it contains.  

Smart idea - but ...

If you then call it a second time, it simply "un-hides" itself so it doesn't go through the form_load() method again.

This means that any initialization done in Form_Load() only happens ONCE, not every time to show() the form.

Where can I put initialization routines that need to happen EVERY TIME you call the form.Show()?

(calling .Dispose() after the .Close() doesn't help, it still does not run the Form.Load() the next time it is shown)

Thanks


David Gordon-Brown


Viewing all articles
Browse latest Browse all 12583

Trending Articles