How to add a image as a resource to the project

P

Peter King

Hi All,
When I read the article :
http://www.codeproject.com/cs/miscctrl/XCtrls.asp
I know how to add a bmp image file ,but I don't know how to add the bmp as a
resource .
In this demo the bitmapButton13 in resx file as the following:
How to do this?
Peter

---------------------------------------------------------------------------------------------------------
<data name="bitmapButton13.Locked" type="System.Boolean, mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="bitmapButton13.DefaultModifiers"
type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="bitmapButton13.Modifiers"
type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="bitmapButton13.ImageFocused" type="System.Drawing.Bitmap,
System.Drawing, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a"
mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
Qk3mBAAAAAAAADYAAAAoAAAAFAAAABQAAAABABgAAAAAAAAAAAAgTgAAIE4AAAAAAAAAAAAA////////
////////////////////////////////////////////////////////////////////////////////
////////////////9f38yejZq9u/oNK3oNO3q9vByeja9P37////////////////////////////////
////////7Ozttd/QfsGhYa+JR55pP5FiP49gR5ViYZx1e6uFvNXE7Ozt////////////////////////
////1ubUmNC3WqaBQqpySbd5VMR+YtaEceaKdeSIZ8V3S5NdV4ZhmLie1+XV////////////////////
7OztmM+2SJ9pP651RbZ5Tb57YdWEgP6Vof+ms/+msv+mjvqMWqBgRnhPlbaa7Ozt////////////////
q9rEWaSAO6dwP6tyQqpxSq5wXsV5f/ONqv+ms/+ms/+ms/+miueBT4JQU4Bcrcas////////////1enZ
e76dNpZlOaBsOptoO5VjQJJfT6Bjb8x2kfuLs/+ms/+ms/+mnf6KZZ9bOFc5eZ592ujZ////////rda6
S6JqNJFjNJBhNIdbM3pSNnNNPnVLUIpUa7Flid15pP+Oov+Okel/aaZfQWM+S3JKsMmu////////mMap
OIRaMYVbMYBXL3BNLmRDLlo9M1c6O1s6SXJFWItSbq5jeL9qcLFlWYtSQGE+OVQ5mbOX////////jLyf
L3RPLnhSLG5LKmBBKlI5KUgyKkEuMUoyO1k6QmRATXVIVYJOUn5LSm9FO1Y5MUYxjaiL////////jLyg
LW9MK2pJKl1BKFE4J0UwJzwrKkAtMUcxOVM3QFw8SWhCS21ESGhBPlo7Nk01MUYxjaiL////////mMWq
NHJNKl9BKVM5J0YxJjsrKT4sMEcxPVc5TGlDWXtLZIlTX4FPTmxEPVY5NEkzOVI3mbOX////////sNW9
RH9UKVg8KEo0Jz8tKD0rL0YwO1Q4UnBGc5xdndB4ptt+ibZrZIdSQVk7MUYxSWxHscmu////////1urc
b5V3KVM5KEUxJzwrK0AtNEwzSWZBdp9fs/aMs/+ms/+kq+GBZ4lUPVQ4MEIvc49x2+ja////////////
pL2qTXBXKEUvKD0rLEEuN081VnVJj79vs/+Us/+ms/+djLlsUm9HNEgyUWhQqLqn////////////////
7ezth6iLPGVDKD0rLEAtNEozSWZBaY1Vkb9woNN5f6llV3RJN0w0QF0/jKSK7ezt////////////////
////2OXWiKaKTm5VKj8tLkEvNUozQVk6SWNASGJAPVQ4MUYxUWpRjKSK1+XW////////////////////
////////7Oztobmhco10TWdONk82L0QvL0QvOFE3UmtQdo50p72k7ezt////////////////////////
////////////////7+zss8ixmLKWi6aJi6aJmLKWs8ix7+zs////////////////////////////////
////////////////////////////////////////////////////////////////////////
</value>
........
 
V

Vadym Stetsyak

Hello, Peter!

PK> Hi All,
PK> When I read the article :
PK> http://www.codeproject.com/cs/miscctrl/XCtrls.asp
PK> I know how to add a bmp image file ,but I don't know how to add the bmp
PK> as a resource .
PK> In this demo the bitmapButton13 in resx file as the following:
PK> How to do this?

Include the image into project, and then pick properties on it. And then select 'Build Action' combo and there select
'Embedded Resource'

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
 
P

Peter King

Thank Vadym Stetsyak,
It seems that the author of this demo can edit the properties of the
bitmapbutton in VS 2003 IDE.
But in my VS2003 IDE, I cannot see any button in the Form edit
interface.Why?
By the way , can't the inherit button show in the form edit interface?
Thanks,
Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top