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
-- 5 2366
"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.Reflecti on.Assembly.Get ManifestResourc eStream
Armin
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.Reflecti on.Assembly.Get ManifestResourc eStream
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?
--
"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.Reflecti on.Assembly.Get ManifestResourc eStream
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
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.Reflecti on.Assembly.Get ManifestResourc eStream
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
"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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 MdiChild property to true to make this form child
I can call functions as you can see like (show), how can i set.MdiParent = this property of dynamically loaded form ?
Or I can call a form function dynamically with parameter ?...
|
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 "Icon" property, browsed for and selected a new icon.
3. I noticed the icon changed on my form
4. Ran my application and sure thing, the new icon replaced the default .NET
icon.
|
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 api function
SHNotificationAdd. How can i do this?
i have tried using ResourceManager to get that icon, but i am getting
back NULL. Even if i did get back an icon, how can i use this to with
the hIcon parameter of SHNotificationAdd?
thank you...
|
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
information, but when it comes to loading the data for the user
control, nothing loads. From my understanding, during postback, the
user control should reload the new information based on the postback.
Some information:
The aspx dynamically...
|
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: Dim ico As Icon = Icon.FromHandle(bmp.GetHicon())
3: Dim file As FileStream = New
FileStream("C:\myfolder\file.ico",FileMode.OpenOrCreate)
4: ico.Save(file)
5: file.Close()
| |
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 . I want to append exisitng value in Formview field
"CustomeID" to url. When userclicks on "view page" ,new window is
opened with dynamic url.
I am able to do generarting url dynamically, but dont know how i can
do rest of the things. Any idea?
|
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 but the tray icon is not
there. If I start the program after Windows has booted up the icon shows
every time. I am assuming that the reason is due to the icon being created
before the system tray is loaded/running. I have used a timer with...
|
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 service. But I'd like my
service to install an icon on the System Tray so that the user can start /
stop / and otherwise control the service interactively, and without having
to go to the Services applet. How do I do this?
Thanks for your advice.
|
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... >>;
treeViewImageList.Images.Add("abc", sourceIcon);
But when I first save the original icon to a stream and then try loading the
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |