Restarting a form
C#
6
Posts
2
Posters
0
Views
1
Watching
-
Hello folks. I have a quick question, so here it is: can I restart a form back to it's original state as if it was newly opened without referencing a parent form or closing it? If so, how? Thanks dudes and dudettes!
-
Never tried it, but perhaps if you: - set this.components = null - remove all controls from this.Controls - call InitializeComponent
The need to optimize rises from a bad design.My articles[^]
-
Holy crockpot! It works:
components = null;
Controls.Clear();
InitializeComponent();Are you some kind of suprogrammer? Thanks, Mika!
-
Lodeclaw wrote:
Are you some kind of suprogrammer
Now I have to ask a stupid question: What's a subprogrammer?
Lodeclaw wrote:
Thanks, Mika
You're welcome :)
The need to optimize rises from a bad design.My articles[^]