Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Friday, February 21, 2025 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Architect Forums - SalesLogix .NET Extensions
Forum to discuss the use of .NET Extensions in SalesLogix version 7 and higher. View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix .NET Extensions | New ThreadView:  Search:  
 Author  Thread: How to handle VS 2005 - Embeded Resource ?
Veronka Capone
Posts: 113
 
How to handle VS 2005 - Embeded Resource ?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 23 Apr 09 3:25 PM
I have a Windows Form App written in C# 2005. I added a new folder to the solution in which I have some images. Right click on the image and set Build Action to Embeded Resource.

How can I display this image into my form now?

I tried

System.Drawing.Image img = ToolboxBitmapAttribute.GetImageFromResource(typeof(Bitmap), "SignaturePad.Images.Sign.bmp", false);

but img is always null.

Thanks.
[Reply][Quote]
Veronka Capone
Posts: 113
 
Re: How to handle VS 2005 - Embeded Resource ?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 24 Apr 09 11:17 AM
Here is how: (the simple way)

http://support.microsoft.com/kb/319292

using System.IO;
using System.Reflection;
...
Assembly _assembly;
Stream _imageStream;

_assembly = Assembly.GetExecutingAssembly();
_imageStream = _assembly.GetManifestResourceStream("MyNameSpace.MyImage.bmp");

[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 2/21/2025 7:16:24 AM