Reputation: 15545
I am new in windows application development. basically i am web developer. but though i want to understand the sequence of events execution in following scenario:
I have win form. it has a button. i am handling the button click event. when i get run my application as usually FormLoad event must execute first. but what after i clicks the button ? will form load execute again before button's click event Or form load executes after button click event. Even i can check it my self , but as i tried this i found no sense there as i explained. in fact i wanted to reload my win form on button click with some static parameters (kept in static class). guide me please.
Upvotes: 0
Views: 891
Reputation: 11
load_event
is fired button_click
event will be fired button_click
event fired form_load
fired.Upvotes: 1
Reputation: 4433
The only thing that happens when you click a button in an application, is the click event is raised, and handled.
Why would a native application re-load the window? Free your mind from this web-type-thinking!
In fact, if you want to re-load the window you should probably have another look at your design, it sounds like it's a bit too web-like. Why are you re-loading the window? If it's just to set some properties, then just set the properties in the click event handler.
Upvotes: 3