468,269 Members | 1,558 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,269 developers. It's quick & easy.

Getting icon from form in dynamically loaded DLL

Tom
I have a main VB.NET application that loads another VB.NET DLL
dynamically. Once I have done that, I would like to be able to 'get'
the icon of a form in that dynamically loaded DLL.

How would one go about doing this in the main form, once the DLL has
been loaded? Thanks in advance.

Tom

--

Mar 7 '06 #1
5 2088
"Tom" <to*@nospam.com> schrieb
I have a main VB.NET application that loads another VB.NET DLL
dynamically. Once I have done that, I would like to be able to 'get'
the icon of a form in that dynamically loaded DLL.

How would one go about doing this in the main form, once the DLL has
been loaded? Thanks in advance.


If the icon is embedded as a resource, have a look at
System.Reflection.Assembly.GetManifestResourceStre am
Armin

Mar 7 '06 #2
Tom
Armin Zingler wrote:
"Tom" <to*@nospam.com> schrieb
I have a main VB.NET application that loads another VB.NET DLL
dynamically. Once I have done that, I would like to be able to 'get'
the icon of a form in that dynamically loaded DLL.

How would one go about doing this in the main form, once the DLL has
been loaded? Thanks in advance.


If the icon is embedded as a resource, have a look at
System.Reflection.Assembly.GetManifestResourceStre am
Armin


No, it is actually a part of the form - i.e. I set the form's ICON
property to be an icon file.

Maybe I should word this differently - since I know how to access a
form dynamically - How would one 'get' the icon of a Windows form via
VB?

--

Mar 7 '06 #3
"Tom" <to*@nospam.com> schrieb
Armin Zingler wrote:
"Tom" <to*@nospam.com> schrieb
I have a main VB.NET application that loads another VB.NET DLL
dynamically. Once I have done that, I would like to be able to
'get' the icon of a form in that dynamically loaded DLL.

How would one go about doing this in the main form, once the DLL
has been loaded? Thanks in advance.


If the icon is embedded as a resource, have a look at
System.Reflection.Assembly.GetManifestResourceStre am
Armin


No, it is actually a part of the form - i.e. I set the form's ICON
property to be an icon file.

Maybe I should word this differently - since I know how to access a
form dynamically - How would one 'get' the icon of a Windows form
via VB?

Set the Icon in the Form designer, then have a look at the "Windows Form
Designer generated code" region to see how the resource is loaded.
Armin

Mar 7 '06 #4
Tom
Armin: I see what you are saying... however, I may have been 'dumb'
about this whole thing... Once I have loaded a DLL, and I know what the
form is, and have a reference to it (i.e. a variable), wouldn't it be
easier to simply reference that forms .Icon property and grab the
icon?? Then I can convert it to a bitmap, picture, whatever....

Tom
--
Armin Zingler wrote:
"Tom" <to*@nospam.com> schrieb
Armin Zingler wrote:
"Tom" <to*@nospam.com> schrieb
> I have a main VB.NET application that loads another VB.NET DLL
> dynamically. Once I have done that, I would like to be able to
> 'get' the icon of a form in that dynamically loaded DLL.
>
> How would one go about doing this in the main form, once the DLL
> has been loaded? Thanks in advance.

If the icon is embedded as a resource, have a look at
System.Reflection.Assembly.GetManifestResourceStre am
Armin


No, it is actually a part of the form - i.e. I set the form's ICON
property to be an icon file.

Maybe I should word this differently - since I know how to access a
form dynamically - How would one 'get' the icon of a Windows form
via VB?

Set the Icon in the Form designer, then have a look at the "Windows
Form Designer generated code" region to see how the resource is
loaded.
Armin

Mar 7 '06 #5
"Tom" <to*@nospam.com> schrieb
Armin: I see what you are saying... however, I may have been 'dumb'
about this whole thing... Once I have loaded a DLL, and I know what
the form is, and have a reference to it (i.e. a variable), wouldn't
it be easier to simply reference that forms .Icon property and grab
the icon?? Then I can convert it to a bitmap, picture, whatever....

:-) If you already have an instance, of course, you can simply access the
Icon property. But what was the question then?

Armin

Mar 7 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Vic | last post: by
1 post views Thread by farseer | last post: by
2 posts views Thread by Duwayne | last post: by
6 posts views Thread by Lespaul36 | last post: by
8 posts views Thread by BB | last post: by
1 post views Thread by =?Utf-8?B?QWRhbQ==?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.