: :
: : Dim Frm as Form1
: : Dim Frm2 as Form1
: : ...
: : Set Frm = New Form1
: : Set Frm2 = Frm
: :
: : One instance of the form, two references to it. Actually I'm not sure whether it's unloaded or not, if I call "Unload Frm". But I guess, since Forms are objects, they follow VB rules for objects (COM reference counting).
: :
:
I just tried the following
: Private Sub Command1_Click()
: Dim Frm As Form1
: Dim Frm2 As Form1
:
: Set Frm = New Form1
: Set Frm2 = Frm
:
: Frm.Show
: End Sub
:
: Private Sub Command2_Click()
: For Each Frm In Forms
: Unload Frm
: Next
:
: End Sub
. Looks like it uloads
It probably does, then. But, that would unload objects too since references fall out of scope.
Nevertheless, it's probably just me messed up: Forms unload when you unload them, and that's all.
: : : : Besides, the post was about controls, not forms ^^;
: : :
Actually, post was about 'Objects/Forms' not controls. If he meant by 'object' 'control', form uloading will work. But if he meant 'object' asking about 'object', form unloading, as I know, won't work. I hope you understand what I am talking about
: :
: : Actually, the first post said:
: : "If I have an object on the form at design time with index 0 and during run time it loads more indices of that object"
: : So I thought he loaded some instances of some controls.
: :
:
Sounds for me like confusing therminalogy
:
Sounds that to me too. But anyways, I tried.