473,394 Members | 1,749 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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 2338
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Ahmet | last post by:
Hi all; I have one application in which I read form names from database to be opened. I open form with the code below, and call its show method for form to be shown but before this, I must set...
2
by: Vic | last post by:
I am trying to change an icon associated with my application's main form and the application itself. 1. I selected my main form in IDE "Solution" tab and went to "Properties" window. 2. I found...
1
by: farseer | last post by:
Hi, I created a new resouce ("app.resx") in my project and added an icon to this resource with name "IL_ICON". I would like to use this resource in some unmanaged code, in particular, with the...
2
by: Duwayne | last post by:
I am having lots of trouble with one of my user controls (ascx) not automatically loading postback data. An image on the aspx page starts the postback and the parent has no problem loading it's own...
6
by: Lespaul36 | last post by:
From what I have read, there isn't really a converter to icon format..it becomes a png file. I tried: 1: Dim bmp As Bitmap = CType(Bitmap.FromFile("C:\myfolder\file.bmp"), Bitmap) 2: ...
8
by: BB | last post by:
Hi, I am using FormView Contol, TextBox (Hidden ) and Submit button whose caption is "View Page" in my aspx page. Here is what I am tryin to do.When page loads I generate dynamic url in text box...
3
by: Patrick Dugan | last post by:
I am using VS2005 (vb) and I have a program that starts when Windows boots up. Occasionally the icon that should appear in the system tray does not show up. The program is still running in memory...
3
by: Joseph Geretz | last post by:
The conventional approach is easy enough; drop a NotifyIcon onto a Form. When the form is loaded - bingo - the icon appears in the System Tray. I can't use this approach though. I'm writing a...
1
by: =?Utf-8?B?QWRhbQ==?= | last post by:
I'm having a problem loading an Icon into an ImageList. When I load the icon directly it works fine, like this: Icon sourceIcon = << Get an icon from somewhere... >>;...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.