Reputation: 11
I know that in C# the Form.Load event occurs only before the form is displayed for the first time. Is there any similar event handler (in C#) which occurs every time that the form is displayed?
Upvotes: 1
Views: 58
Reputation: 2992
It can be
Shown
event - fired when the form is first shownLoad
event - fired whenever the user loads the formActivate
event - fired each time the form is activated or receives the focusVisibleChanged
event - fired whenever the visibility changesUpvotes: 1
Reputation: 65079
Assuming that you're showing and hiding the form instead of destroying it.. then you can hook into the VisibleChanged event and perform some code when its Visible
property is true
.
Upvotes: 1