Re: Class termination

From: Michael C (mculley_at_NOSPAMoptushome.com.au)
Date: 02/22/05


Date: Wed, 23 Feb 2005 07:56:14 +1100


"MikeD" <nobody@nowhere.edu> wrote in message
news:eliFesOGFHA.208@TK2MSFTNGP12.phx.gbl...
> No trick. It just has to be late-bound. IOW, use As Object. But again,
> there's no good reason I can think of for doing this (but lots of bad
> ones).

That is getting a little hacky. :-)

> True, but that would be the case for ANY procedure that could be common to
> both. Again, that has nothing to do with to use or not to use forms in a
> DLL.

It has everything to do with forms in the dll. The procedure needs to be
duplicated in 2 locations because forms are in the dll.

>> Partly true but it's also due to the need to add hacks to get around
>> limitations.
>
> Give an example.

The need to make the exe into an ActiveX. :-)

> How is that a hack? If you need the DLL to be able to instantiate a class
> in the EXE, the way to do that is to make the EXE ActiveX. I don't see
> how
> that's a hack or "getting around" anything. That's the proper way to do
> it.

That is a *huge* hack in my books. The ActiveX exe is there to expose your
app to other apps, not to expose it to it's own components in a circular
reference. If your exe needs to reference a dll that is referencing it then
you've got some *huge* problems in the design of your app.

>> > Sure they are. But properties and methods of say the App object are
> going
>> > to
>> > return different values in the DLL than in the EXE. That MIGHT be
>> > desirable.
>>
>> Not likely.
>
> It's just as likely as not likely.

If you use the dll as you have then maybe but if you use the dll for
standard forms in the app then it won't be desirable.

> You just seem to be missing the point. You have it set in your mind that
> the EXE needs ways to reference a form in a DLL.

Absolutely. You are chucking away a huge amount of functionality by not
being able to reference the form. My app has all sorts of functionality that
works based on getting a reference to a form. As an example I can push
ctrl-F at any location in my app and search on any control that has a list
such as combobox, listbox etc. To implement that at a later stage with some
of the forms in a dll would have been a nightmare requiring all sorts of api
hacks.

> I don't see how it's any messier simply because the DLLs have forms,
> EXCEPT
> that you seem convinced the main app MUST be able to reference those
> forms.

Yes, they should. The exe (read GUI component of app) should have access to
all of it's forms. In the case of some fairly simple forms that don't have
much functionality and don't access the database it would be passable, but
for anything more complex....

Michael



Relevant Pages

  • Re: Multiple References and Object Instantiation??
    ... Information is also sent to which is also a mdiChild of Main ... App - from both Customer.Dll and Activity.Dll ... In the Main Application I was able to make a reference to all the forms (The ... >> this app each dll is a different form. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Multiple References and Object Instantiation??
    ... Information is also sent to which is also a mdiChild of Main ... App - from both Customer.Dll and Activity.Dll ... In the Main Application I was able to make a reference to all the forms (The ... >> this app each dll is a different form. ...
    (microsoft.public.dotnet.framework)
  • Re: Multiple References and Object Instantiation??
    ... Information is also sent to which is also a mdiChild of Main ... App - from both Customer.Dll and Activity.Dll ... In the Main Application I was able to make a reference to all the forms (The ... >> this app each dll is a different form. ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: Multiple References and Object Instantiation??
    ... Information is also sent to which is also a mdiChild of Main ... App - from both Customer.Dll and Activity.Dll ... In the Main Application I was able to make a reference to all the forms (The ... >> this app each dll is a different form. ...
    (microsoft.public.dotnet.general)
  • Re: Multiple References and Object Instantiation??
    ... Information is also sent to which is also a mdiChild of Main ... App - from both Customer.Dll and Activity.Dll ... In the Main Application I was able to make a reference to all the forms (The ... >> this app each dll is a different form. ...
    (microsoft.public.dotnet.framework.windowsforms.controls)

Loading