Re: Re; Get the parent assembly
From: mageos (mageos_at_spammers.have.big.zits)
Date: 11/16/04
- Next message: Pete: "Re: Where to dispose what"
- Previous message: Doug Holton: "Re: Alternative to Windows.Forms"
- In reply to: Steven Cheng[MSFT]: "RE: Re; Get the parent assembly"
- Next in thread: Darren Green: "Re: Re; Get the parent assembly"
- Reply: Darren Green: "Re: Re; Get the parent assembly"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 16 Nov 2004 17:31:39 GMT
Another possibility is to get the Windows form that is hosting your control.
System.Windows.Forms.Form parentForm = FindForm();
if ( parentForm != null )
{
System.Type classType = parentForm.GetType();
System.Assembly classAssembly = classType.Assembly;
}
Hope that helps
Matt Osborne
Steven Cheng[MSFT] wrote:
> Hi Darren,
>
> In addition to Richard's suggestion on the "GetEntryAssembly" ,you may also
> try the "GetCallingAssembly" which may also help. And seems currently we
> only have the two means to get the upper stream assembly.
> If the parent assembly is the main assembly of that applcation, then the
> GetEntryAssembly can do it well.
> Thanks.
>
> Regards,
>
> Steven Cheng
> Microsoft Online Support
>
> Get Secure! www.microsoft.com/security
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
>
- Next message: Pete: "Re: Where to dispose what"
- Previous message: Doug Holton: "Re: Alternative to Windows.Forms"
- In reply to: Steven Cheng[MSFT]: "RE: Re; Get the parent assembly"
- Next in thread: Darren Green: "Re: Re; Get the parent assembly"
- Reply: Darren Green: "Re: Re; Get the parent assembly"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|