Put a bitmap in a resource file

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi
This is probably a simple one for somebody. I have a C# assembly that I want to put in the GAC. I have created a simple bitmap to associate with it. I need to create a .resx file in my assembly before I deploy it. Can anyone tell me how to get that bitmap into my .resx? Thanks
JT
 
I ended up accomplishing this with resXgen.exe from the SDK. Is there another way, as I have a real aversion to the Command Line
JT
 
Hi,

Thanks for your post. As I understand, you want to embed a bitmap to your
assembly. Please correct me if there is any misunderstanding. You can
achieve that by adding the bitmap file to your project and setting its
"Build Action" to "Embedded Resource". Please refer to the following MSDN
article for detailed information:

HOW TO: Load a Bitmap or Image from a Resource by Using Visual C#
http://support.microsoft.com/?ID=324567

Hope this helps.

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Hi Huang
I was actually trying to emulate the manner in which a BizTalk Server 2004 custom functoid is created in the BTS SDK. There, they have a resource file (resx), which hold name, description, tooltip, and bitmap info for the functoid. The resource is refrenced as

SetupResourceAssembly("myProject.myResourceName", Assembly.GetExecutingAssembly())

I created a resx file with resXgen.exe to incorporate my bitmap. Basically, I followed the exact example of the sample. I then put my assembly into the GAC. Nevertheless, my functoid has no bitmap, name, tooltip, or description when I add it to the toolbar in VS.net. I aam also going to post this in BTS.SDK group
John
 
Hi John,

Thanks for your update. To narrow down the problem, I suggest that you can
check the embeded resource without using BTS SDK. If it works, the problem
relates to BTS SDK and you'd better resort the its corresponding group. I
am not familiar with BTS SDK, sorry I am not able to provide more
information here.

Have a nice day!

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Back
Top