I have an icon that I can reference by the following:
Dim im As System.Drawing.Image
im = im.FromFile(lsapppath & "ChkMrk.ico")
g_mainform.fg.SetCellImage(g_mainform.FG.Row, 5, im)
The problem is that I do NOT want to reference this as "from file" - the icon is already
embedded in the program, but I can't seem to find a way to convert my embedded icon
to an image.
Any help appreciated. TIA. 8 3968
You can get embedded objects through the resource reader. See info on ResourceReader
"news.microsoft.com" <no*****@nothanks.com> wrote in message news:OE**************@TK2MSFTNGP10.phx.gbl...
I have an icon that I can reference by the following:
Dim im As System.Drawing.Image
im = im.FromFile(lsapppath & "ChkMrk.ico")
g_mainform.fg.SetCellImage(g_mainform.FG.Row, 5, im)
The problem is that I do NOT want to reference this as "from file" - the icon is already
embedded in the program, but I can't seem to find a way to convert my embedded icon
to an image.
Any help appreciated. TIA.
You can get embedded objects through the resource reader. See info on ResourceReader
"news.microsoft.com" <no*****@nothanks.com> wrote in message news:OE**************@TK2MSFTNGP10.phx.gbl...
I have an icon that I can reference by the following:
Dim im As System.Drawing.Image
im = im.FromFile(lsapppath & "ChkMrk.ico")
g_mainform.fg.SetCellImage(g_mainform.FG.Row, 5, im)
The problem is that I do NOT want to reference this as "from file" - the icon is already
embedded in the program, but I can't seem to find a way to convert my embedded icon
to an image.
Any help appreciated. TIA.
CJ --
Um, well, thanks, but that still doesn't help me. A real-life example would be appreciated.
"CJ Taylor" <[cege] at [tavayn] dit commmmm> wrote in message news:Oi**************@TK2MSFTNGP10.phx.gbl...
You can get embedded objects through the resource reader. See info on ResourceReader
"news.microsoft.com" <no*****@nothanks.com> wrote in message news:OE**************@TK2MSFTNGP10.phx.gbl...
I have an icon that I can reference by the following:
Dim im As System.Drawing.Image
im = im.FromFile(lsapppath & "ChkMrk.ico")
g_mainform.fg.SetCellImage(g_mainform.FG.Row, 5, im)
The problem is that I do NOT want to reference this as "from file" - the icon is already
embedded in the program, but I can't seem to find a way to convert my embedded icon
to an image.
Any help appreciated. TIA.
CJ --
Um, well, thanks, but that still doesn't help me. A real-life example would be appreciated.
"CJ Taylor" <[cege] at [tavayn] dit commmmm> wrote in message news:Oi**************@TK2MSFTNGP10.phx.gbl...
You can get embedded objects through the resource reader. See info on ResourceReader
"news.microsoft.com" <no*****@nothanks.com> wrote in message news:OE**************@TK2MSFTNGP10.phx.gbl...
I have an icon that I can reference by the following:
Dim im As System.Drawing.Image
im = im.FromFile(lsapppath & "ChkMrk.ico")
g_mainform.fg.SetCellImage(g_mainform.FG.Row, 5, im)
The problem is that I do NOT want to reference this as "from file" - the icon is already
embedded in the program, but I can't seem to find a way to convert my embedded icon
to an image.
Any help appreciated. TIA.
>Um, well, thanks, but that still doesn't help me. A real-life example would
be appreciated.
Dim myIcon As Icon = New System.Drawing.Icon(Me.GetType,
"MyEmbeddedIcon.ico")
Dim myBitmap As Bitmap = Bitmap.FromHicon(myIcon.Handle)
Erik
>Um, well, thanks, but that still doesn't help me. A real-life example would
be appreciated.
Dim myIcon As Icon = New System.Drawing.Icon(Me.GetType,
"MyEmbeddedIcon.ico")
Dim myBitmap As Bitmap = Bitmap.FromHicon(myIcon.Handle)
Erik
* "Erik Frey" <er*******@hotmail.com> scripsit: Um, well, thanks, but that still doesn't help me. A real-life example would be appreciated.
Dim myIcon As Icon = New System.Drawing.Icon(Me.GetType, "MyEmbeddedIcon.ico") Dim myBitmap As Bitmap = Bitmap.FromHicon(myIcon.Handle)
Alternatively it may be the preferred way to store a bitmap instead of
the icon...
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
* "Erik Frey" <er*******@hotmail.com> scripsit: Um, well, thanks, but that still doesn't help me. A real-life example would be appreciated.
Dim myIcon As Icon = New System.Drawing.Icon(Me.GetType, "MyEmbeddedIcon.ico") Dim myBitmap As Bitmap = Bitmap.FromHicon(myIcon.Handle)
Alternatively it may be the preferred way to store a bitmap instead of
the icon...
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/> This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: [Yosi] |
last post by:
I have a form , I want to change form icon relate to some states,
I all image list witch include some icons.
How can I convert image to Icon or how to change the form icon ....in run time
|
by: Arda Coskun |
last post by:
Hi,
How to create embedded graphics and audios? Any article would be helpful.
Kind regards,
|
by: Stanley |
last post by:
I wish to set Form.Icon from an image list but seems like the image list
didn't provide a method to extract the image as an Icon type.
Thus, can anyone show me a way the conversion
From:...
|
by: Wayne Hoover |
last post by:
I have an embedded icon resource in my project - I need to reference this
icon for a grid cell. I've tried using the following but it does not work. Any
help
appreciated:
Dim im As...
|
by: news.microsoft.com |
last post by:
I have an icon that I can reference by the following:
Dim im As System.Drawing.Image
im = im.FromFile(lsapppath & "ChkMrk.ico")
g_mainform.fg.SetCellImage(g_mainform.FG.Row, 5, im)
The problem...
|
by: Garrett |
last post by:
I'm fairly new to VB .NET and programming in general, and I want to
give my program its own icon without it being a separate file. I have
the icon as part of the project, and its Build Action is...
|
by: Udi |
last post by:
Hi,
I have an imagelist initialized in design time with
several icons files (.ico).
However, when I need to extract an icon (Image)
from the Imagelist, I can't convert it back to an icon:
...
|
by: =?Utf-8?B?U3RldmVU?= |
last post by:
I have a structure that contains both 32x32 and 16x16 icons plus some text.
I want to write all this to an XML file so that I can recover the icons later
in an application. Can someone tell me how...
|
by: Marcolino |
last post by:
Hi,
I have simple needs but I don't know how to implement it.
I have application that create Dynamic Button. I need to set the image
on this button, getting the icon from a form.
So pratically...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
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,...
|
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...
|
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,...
| | |