473,508 Members | 2,363 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

HOWTO: Load a bitmap from a resource

I am using a ImageList with a bitmap that contains all the images.

I am currently saving the bitmap in a PictureBox, and load into the
ImageList when the form loads.

How can I save the bitmap into a Resource and load it from there later?

Thanks.
Alejandro Lapeyre
Nov 21 '05 #1
2 8733
Hi,

Here is an example. I added the water lilies.jpg to my app and set
its
build action to embedded resource.
Dim bm As Bitmap

Dim myAsm As System.Reflection.Assembly =
System.Reflection.Assembly.GetExecutingAssembly()

bm = New Bitmap(myAsm.GetManifestResourceStream(Me.GetType, "Water
lilies.jpg"))

Ken

---------------
"Alejandro Lapeyre" <Al**************@jotmail.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
I am using a ImageList with a bitmap that contains all the images.

I am currently saving the bitmap in a PictureBox, and load into the
ImageList when the form loads.

How can I save the bitmap into a Resource and load it from there later?

Thanks.
Alejandro Lapeyre

Nov 21 '05 #2
thanks!
T H A N K S !!!!!!!

"Ken Tucker [MVP]" <vb***@bellsouth.net> escribió en el mensaje
news:OT**************@TK2MSFTNGP10.phx.gbl...
Hi,

Here is an example. I added the water lilies.jpg to my app and set
its
build action to embedded resource.
Dim bm As Bitmap

Dim myAsm As System.Reflection.Assembly =
System.Reflection.Assembly.GetExecutingAssembly()

bm = New Bitmap(myAsm.GetManifestResourceStream(Me.GetType, "Water
lilies.jpg"))

Ken

---------------
"Alejandro Lapeyre" <Al**************@jotmail.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
I am using a ImageList with a bitmap that contains all the images.

I am currently saving the bitmap in a PictureBox, and load into the
ImageList when the form loads.

How can I save the bitmap into a Resource and load it from there later?

Thanks.
Alejandro Lapeyre

Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
2057
by: Richie Adler | last post by:
Does anyone know of a bitmap/resource/image collection for a Spanish card deck? I'm planning to create a new cardgame which requires this kind of deck (prototyping in Python and possible final...
2
492
by: Cindy Liu | last post by:
Hi, If my xml resource file is directly under my project file, I have no problem to load that xml file via Assembly.GetManifestResourceStream. However, after I create a folder under the project...
1
2181
by: Ed Sutton | last post by:
How can I load a resource from any namespace in my project? I have all my icons located under the following namespace: ..\resources\images\ For example, I can not figure out how to load them...
1
1188
by: Alex Nitulescu | last post by:
Hi. My site has a splash screen which, to look its best, really depends on the synchronization between animation and sounds. My question is - how to load the small mp3 file (about 350k) BEFORE...
1
1682
by: Fredrik Melin | last post by:
Hi, How can I load a localized resource file without changing the UI culture? Sample: System is running in English (default) but I want to create a System.Resource.ResourceManager and...
5
6199
by: dotnetchic | last post by:
(Sorry about cross-post to MFC...got no reply so I'm reposting here) Porting my code over from VC++6 to MC++, loading bitmaps from resources broke. This code is in a lib file (previously, it was...
1
8645
by: Lee | last post by:
Visual Studio 2.0 / XP Professional with all service packs Assume the appropriate Using directives. The following statements work: ComponentResourceManager resources = new...
8
12054
by: John Dunn | last post by:
Since currently we aren't allowed to have compiled XAML files embedded in C++ apps I'm using Markup::XamlReader::Load to dynamically load XAML files. This works perfectly fine with external files...
1
1770
by: kenneth6 | last post by:
Give me some help, pls!! I am doing an image processing project. I decide to import some prepared binary images (in binary BMP format) into the resources sections of a MFC C++ project. The...
0
7223
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
7115
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
7321
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
7377
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
5624
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5047
isladogs
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...
0
4705
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3191
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
762
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.