Actually what you should do is add an event handler to either the Load event or the VisibleChanged event. It all depends on if you want the code to execute everytime the form is shown, or only the first time the form is shown.
Obviously, use Load if you only want the code to execute the first time. Use VisibleChanged if you want the code to execute everytime the form is shown.