user3621745
user3621745

Reputation: 11

About "Load" event

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

Answers (2)

Jade
Jade

Reputation: 2992

It can be

  • Shown event - fired when the form is first shown
  • Load event - fired whenever the user loads the form
  • Activate event - fired each time the form is activated or receives the focus
  • VisibleChanged event - fired whenever the visibility changes

Upvotes: 1

Simon Whitehead
Simon Whitehead

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

Related Questions