Reputation: 435
For various reasons, I've got a form in an app that needs to remain opened all the time (mostly because users want any data they type there to be "remembered" by the form)... so I allow them to hide it only.
I had THOUGHT that adding a "shown" event would allow me to fire some code every time they re-displayed the form, but now I see that the Shown event only fires ONCE during the form's lifecycle.
What event fires when you do another "Show()" on the hidden form?
Upvotes: 4
Views: 1412
Reputation: 857
you can use :
VisibleChanged event :
Activated event :
http://msdn.microsoft.com/en-us/library/system.windows.forms.form.activated(v=vs.110).aspx enter link description here
Upvotes: 0
Reputation: 941208
You need the VisibleChanged event
http://msdn.microsoft.com/en-us/library/system.windows.forms.control.visiblechanged%28v=vs.110%29.aspx
Upvotes: 6
Reputation: 7618
You need the Activated event.
http://msdn.microsoft.com/en-us/library/system.windows.forms.form.activated(v=vs.110).aspx
Upvotes: 2