G
Guest
I am experiencing some unexpected behavior with the Form Load event in a
Windows application. Hopefully, someone can explain why this behavior is
occurring.
In my application, I have a form that I would like to show multiple times
throughout the life of the application. The startup code for this form can
be quite lengthy so I am hiding and showning the form (versus unloading and
loading it). If I show the form non-modally (using the Show method), the
code in the Load event is fired only one time. If I show the form modally
(using the ShowDialog method), the code in the Load event is fired every time
I make the form visible.
Is there an explanation as to why this behavior is occuring?
Thank you,
Jason Richmeier
Windows application. Hopefully, someone can explain why this behavior is
occurring.
In my application, I have a form that I would like to show multiple times
throughout the life of the application. The startup code for this form can
be quite lengthy so I am hiding and showning the form (versus unloading and
loading it). If I show the form non-modally (using the Show method), the
code in the Load event is fired only one time. If I show the form modally
(using the ShowDialog method), the code in the Load event is fired every time
I make the form visible.
Is there an explanation as to why this behavior is occuring?
Thank you,
Jason Richmeier