Re: DLL Problem

Tech-Archive recommends: Fix windows errors by optimizing your registry



Yes, however this does not see Friend declarations.
What I finally found was to add a BAS module and put the Object in the BAS
module.
Set the BAS module from the CLS module and all including Friend works.
Do not understand why Friend is hidden when declaring object on the form.

Thanks for the brainboot.

"Andrew D. Newbould" wrote:

> In message <DC0038FC-1460-4CC0-A5A1-E1E4CAB844FF@xxxxxxxxxxxxx>, Lorin
> <Lorin@xxxxxxxxxxxxxxxxxxxxxxxxx> writes
> >Created a DLL with a Class and one Form.
> >There are multiple instances of this one Form loaded as needed.
> >LOADing multiple forms not available - only for Controls I think.
> >Array of Forms using Redim Preserve seems to work however the Form cannot be
> >declared with WithEvents (not allowed with arrays).
> >The form generates events and needs to pass back to the Class.
> >The Class will then raise an event in the DLL caller.
> >It is declared with WithEvents.
> >I cannot get the Form to see the Class so I can only go from Class to Form,
> >but not from Form back to Class.
> >How to do?
>
> Declare a Public variable (ie: myClass) with the Object type on the
> form.
>
> When the Class LOAD's the form initialise myClass on form as reference
> to itself (ie: Set frmMain(x).myClass = Me).
>
> Within form use myClass to reference functions in your main class.
>
> Just make sure to un-initialise myClass on the form before UNLOADing it
> to release the memory and references (ie: Set frmMain(x).myClass =
> Nothing).
>
> --
> Andrew D. Newbould E-Mail: newsgroups@xxxxxxxxxxxxxxxxx
>
> ZAD Software Systems Web : www.zadsoft.com
>
.



Relevant Pages

  • Re: Disconnect between project and module
    ... when my project calls a routine in the module, ... Both my .bas module file and the .dll library are in the ... I think you need to show the declarations from the BAS module and the line ...
    (microsoft.public.vb.general.discussion)
  • Re: template friend operator and template class: problem
    ... I started doing this template ... > friend operator from a declaration of a friend template operator that ... > forward declarations to work. ... So it compiles for you now? ...
    (alt.comp.lang.learn.c-cpp)