By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,552 Members | 893 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,552 IT Pros & Developers. It's quick & easy.

HOWTO: Load a bitmap from a resource

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.