You'll want to handle the Application.Startup event to initialise global variables. You can access it by navigating to your project's properties page and clicking the button View Application Events, then selecting the startup event from the drop down list or just adding the following code manually within the class:

Code:
Private Sub MyApplication_Startup( _
    ByVal sender As Object, _
    ByVal e As Microsoft.VisualBasic.ApplicationServices.StartupEventArgs _
) Handles Me.Startup

End Sub