I have a project with more than one form and I move between them with a button click that hides the current form and shows the one I want. But what is I want to perform some procedure each time the form is shown? I tried this code on my Form2:
Private Sub Form2_Shown(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Shown MsgBox(testString) End Sub
... to put a variable into MsgBox and, when I run the program, it works the first time the form is shown, but not when I go back to it from another form. Is there some other event handler I should be using?