Home All Groups Group Topic Archive Search About

Get all forms contained in another project

Author
8 Sep 2006 7:58 PM
Roman
By mistake I tried to ask this question in dotnet.framework.adonet
but this one seems more appropriate.
Is there a way to get a list of all forms contained in another
solution/project?

Thanks in advance,
Roman

Author
8 Sep 2006 8:19 PM
Mythran
"Roman" <romanm@nospam.net> wrote in message
news:%23F0PuE40GHA.3908@TK2MSFTNGP05.phx.gbl...
> By mistake I tried to ask this question in dotnet.framework.adonet
> but this one seems more appropriate.
> Is there a way to get a list of all forms contained in another
> solution/project?
>
> Thanks in advance,
> Roman
>

From where?  An add-in?  A separate application?  Macro?  Some of those ways
are easy, while others take a little more work :)

Just let us know more info first.

Mythran
Author
11 Sep 2006 1:29 PM
Roman
Hi Mythran,
Thanks for quick reply.
I am creating an application that manages tool tip text for controls
contained in a separate
application. The user needs to be able to point to another application or
..exe file
to bring in the names of all forms and controls from that application.

Thanks again,
Roman

Show quoteHide quote
"Mythran" <kip_pot***@hotmail.com> wrote in message
news:%23KBQeQ40GHA.3464@TK2MSFTNGP03.phx.gbl...
>
> "Roman" <romanm@nospam.net> wrote in message
> news:%23F0PuE40GHA.3908@TK2MSFTNGP05.phx.gbl...
>> By mistake I tried to ask this question in dotnet.framework.adonet
>> but this one seems more appropriate.
>> Is there a way to get a list of all forms contained in another
>> solution/project?
>>
>> Thanks in advance,
>> Roman
>>
>
> From where?  An add-in?  A separate application?  Macro?  Some of those
> ways are easy, while others take a little more work :)
>
> Just let us know more info first.
>
> Mythran
>
>
Author
12 Sep 2006 3:14 PM
Mythran
"Roman" <romanm@nospam.net> wrote in message
news:%235gdYZa1GHA.1304@TK2MSFTNGP05.phx.gbl...
> Hi Mythran,
> Thanks for quick reply.
> I am creating an application that manages tool tip text for controls
> contained in a separate
> application. The user needs to be able to point to another application or
> .exe file
> to bring in the names of all forms and controls from that application.
>
> Thanks again,
> Roman


If i understand you correctly, then what you need is to use reflection to
load the assembly (assuming the destination assembly is a .Net assembly) and
then get the list of types inside the assembly.  The data types contained
within the assembly can be detected to see if they derive from "Form".

HTH,
Mythran
Author
13 Sep 2006 3:44 PM
Roman
Thank you very much, Mythran. That was right on target!
Your suggestions allowed me to extract form names from an assembly.
I also was able to read control names from each form.

Best regards,
Roman


Show quoteHide quote
"Mythran" <kip_pot***@hotmail.com> wrote in message
news:OuDQe4n1GHA.1548@TK2MSFTNGP02.phx.gbl...
>
> "Roman" <romanm@nospam.net> wrote in message
> news:%235gdYZa1GHA.1304@TK2MSFTNGP05.phx.gbl...
>> Hi Mythran,
>> Thanks for quick reply.
>> I am creating an application that manages tool tip text for controls
>> contained in a separate
>> application. The user needs to be able to point to another application or
>> .exe file
>> to bring in the names of all forms and controls from that application.
>>
>> Thanks again,
>> Roman
>
>
> If i understand you correctly, then what you need is to use reflection to
> load the assembly (assuming the destination assembly is a .Net assembly)
> and then get the list of types inside the assembly.  The data types
> contained within the assembly can be detected to see if they derive from
> "Form".
>
> HTH,
> Mythran
>
>