I have a Form and I want to load a ListBox with values as the Form loads. I put my own function at the end of the Form's InitializeComponent() like this:
Private Sub InitializeComponent() ' Form initialization
Me.LoadSiteLocations() 'My vb file code
However, if I try to view the Form in the designer it gives me the error seen in the picture below.
If I run the program it runs fine, I just can't view the Form in the designer. If I remove the call to LoadSiteLocations() I can view the designer but obviously the ListBox won't get filled.
Just how should I be calling this method??