Zima <zimow...@NOSPAMexecpc.com> schrieb in im Newsbeitrag:
O2$QkL8o$GA.255@cppssbbsa04...
> Couple more things to clarify previous post (I didn't realize it might not
> be obvious). In class constructor you want to setup m_frmWhatever to hold
> the pointer to your form. You can do this like this:
> Private Sub Class_Initialize()
> Load MyForm
> set m_frmWhatever = MyForm
> End Sub
> I'm assuming it's obvious m_frmWhatever is defined as private member at
the
> class scope like this:
> Private m_frmWhatever As Form
> Also, I'm assuming you've got your own implementations to display the
form,
> something like this:
> Public Sub ShowMyForm()
> m_frmWhatever.Show
> End Sub
> Finally, I had a little typo with the pointer assignment from class object
> to client level var. Don't use parantheses to pass property as I had it.
> ' TYPO: Set frmDLLForm = oObj.FormList()
> use it like this:
> Set frmDLLForm = oObj.FormList
> That should do it.
> Bye now.
Ok, I see... but I forgot to show the whole problem (depends on my English).
Let me try to explain again:
I have a project (ActiveX-DLL), one form, one class.
Then I need to have several instances of e.g. Form1 (in Class1: set
oForm(Index) = Form1)
Then each instanced form needs a reference to Class1 (in Form1: Public
cParent = Class1) because they use subs and functions in Class1.
The problem occurs when closing (unload) the forms and leaving Class1. I
think the problem depends on crossreferencing form and class. And this is
the (a) real problem...
Dieter