Re: Multiple References and Object Instantiation??

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

From: Sijin Joseph (sijinNOSPAMdotnet_at_hotmail.com)
Date: 08/19/04


Date: Thu, 19 Aug 2004 16:51:27 +0530

The simplest solution for you would be for each of the child forms to
implement a property which returned the dataset.

Sijin Joseph
http://www.indiangeek.net
http://weblogs.asp.net/sjoseph

Charles A. Lackman wrote:
> Hello,
>
> Thank you for your help. I still have to problems. I will Domonstrate what
> I am experiencing:
>
> (Main App.exe) ->instantiates as mdiChild->(Customer.Dll)->sends populated
> Dataset to - is also a mdiChild to Main App.exe->(Activity.Dll)
>
> Information is also sent to (Contract.Dll) 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
> Dlls) and instantiate them and have them displayed as mdiChildren, which
> works fine. I can send a dataset from the Main App to the Dlls without
> problems. The real problem is sending the modified dataset back to the main
> app when the form (Dll) has lost focus. Forms (Dlls) are not closed they
> are simply hidden. As you can see, the problem is referecing the
> Activity.Dll from both the Main App.exe and the Customer.Dll.
>
> The Articles you sent gave me some good ideas, but they are hard for me to
> read because they are not in VB.NET. Sorry, anyway, when the Activity Form
> looses focus, how do I make the form send a value to the Main App.
>
> In the Main App Load Event I :
>
> Activity.MdiParent = Me
> Activity.Show()
>
> The code continues to run using show (cannot use showdialog with mdiParent),
> so how would I send a value back to the Main App when the LostFocus event is
> fired in the Activity Form?
>
> Could I implement an interface that handles the Activity LostFocus Event?
> but if so, how would I determine when the event was fired from the Main App?
>
> Thank You,
> Chuck
>
>
> "Sijin Joseph" <sijinNOSPAMdotnet@hotmail.com> wrote in message
> news:OfQ%23iaPhEHA.704@TK2MSFTNGP09.phx.gbl...
>
>>Well basically what you are doing is creating a plugin architecture for
>>your application. What you need to do in this case is to facilitate
>>communication between the plugin forms using Interfaces. The interface
>>will be common and you will be passing a reference to the interface
>>between the forms rather than passing the actual form objects.
>>
>>check out these articles on CodeProject about Plugin architectures
>>
>>http://www.codeproject.com/csharp/C__Plugin_Architecture.asp
>>http://www.codeproject.com/csharp/pluginmanager.asp
>>http://www.codeproject.com/csharp/PluginsInCSharp.asp
>>http://www.codeproject.com/dotnet/SMRefactorAddinArticle.asp
>>
>>Let me know if you need further help.
>>
>>Sijin Joseph
>>http://www.indiangeek.net
>>http://weblogs.asp.net/sjoseph
>>
>>
>>
>>Charles A. Lackman wrote:
>>
>>>I am working on a application that has many custom made dlls. Actually,
>
> for
>
>>>this app each dll is a different form. I am able, with no problem to
>>>reference and instantiate them to use their public properties and
>
> methods
>
>>>with no problem. But, if one dll is trying to access another dll's
>>>properties (this does not work very good) the project tries to copy the
>
> dll
>
>>>to the directory which already contains the dll and the app will not
>>>compile. I have tried different ways to work around this, ie.
>>>
>>>Create a Class that instantiates all the forms from the dlls and
>
> reference
>
>>>the Class from whatever needs them. I can reference them just fine but
>>>cannot instantiate anything. Basically I am referencing a reference
>
> from a
>
>>>reference.
>>>
>>>Is there a way to Globally include all the dll's in the project using a
>>>config file or something so that once the dll is referenced, it is
>>>accessible by everything that is referenced from the Main App and
>
> Eachother?
>
>>>I don't believe this is very efficient and would greatly appreciate any
>>>suggestions, on better ways to accomplish this. The basic plan is to
>
> have
>
>>>all the forms independant of the Main App so that if a single form is
>>>changed all that is needed is to updated is the corresponding dll.
>>>
>>>Thanks,
>>>
>>>Chuck
>>>
>>>
>>>
>
>
>



Relevant Pages

  • Re: Multiple References and Object Instantiation??
    ... I can send a dataset from the Main App to the Dlls without ... Sorry, anyway, when the Activity Form ... > Could I implement an interface that handles the Activity LostFocus Event? ...
    (microsoft.public.dotnet.framework)
  • Re: Multiple References and Object Instantiation??
    ... I can send a dataset from the Main App to the Dlls without ... Sorry, anyway, when the Activity Form ... > Could I implement an interface that handles the Activity LostFocus Event? ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: Multiple References and Object Instantiation??
    ... I can send a dataset from the Main App to the Dlls without ... Sorry, anyway, when the Activity Form ... > Could I implement an interface that handles the Activity LostFocus Event? ...
    (microsoft.public.dotnet.general)
  • Re: Multiple References and Object Instantiation??
    ... I can send a dataset from the Main App to the Dlls without ... Sorry, anyway, when the Activity Form ... > Could I implement an interface that handles the Activity LostFocus Event? ...
    (microsoft.public.dotnet.framework.windowsforms.controls)
  • Re: COM Question
    ... interface (or base class - it doesn't have to specifically be an ... Each new object will reference this same DLL to get the ... Your "consumer" app also references the original base that holds the ...
    (microsoft.public.dotnet.framework.compactframework)