Hi Ray,
As you found out, declaring and instantiating a new Form1 doesn't work. All you are doing is creating a
second instance of Form1, which of course doesn't represent your first Form1.
Here's what you could do:
1. Declare a Public variable to hold your Form1 reference so it is available to all other forms as well.
Code:
Dim MainForm As Form1
2. Add a Sub Main() to your project.
3. Add the following code to that method:
Code:
Public Sub Main()
MainForm = New Form1
MainForm.ShowDialog()
End Sub
4. Make the Main method the start-up object of your project. You can do that on the Properties dialog for the project.
Now whenever you start your app, the Main function runs. It creates a new Form1 and assigns a reference to it to the MainForm variable. All other forms should now be able to see your MainForm and access its controls.
HtH
Imar
----------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.