JunglesMcBeef
Programmer
- Sep 18, 2003
- 266
G'day,
I have a program that has a main form and many forms that are opened from the main form. Now, what I am trying to work out is if there is anyway to assign the main form to an object variable within one of those other forms, so I can work with the already loaded main form. I have been using Dim oMain as New frmMain but from my understanding wouldn't this create a completely new instance of that form? Also i'm wondering why the assignment above IS working, ie when I change a property of oMain, it changes the property of the Main form that is already loaded, even though oMain is a newly created instance. This is confusing me, so if someone can please clarify it for me I will appreciate it very much.
I have a program that has a main form and many forms that are opened from the main form. Now, what I am trying to work out is if there is anyway to assign the main form to an object variable within one of those other forms, so I can work with the already loaded main form. I have been using Dim oMain as New frmMain but from my understanding wouldn't this create a completely new instance of that form? Also i'm wondering why the assignment above IS working, ie when I change a property of oMain, it changes the property of the Main form that is already loaded, even though oMain is a newly created instance. This is confusing me, so if someone can please clarify it for me I will appreciate it very much.