Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

malpass

Loading a bitmap resource isnt working

This topic is 5534 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I made an example app that loads a bitmap from a resource fine
        
public class Form1 : Form
{
	/*
	 * Normal window form stuff here
	 */

	protected override void OnLoad(EventArgs ea)
	{
		pictureBox1.Image = new Bitmap(GetType(),"myBitmapResource.bmp");
	}
	static void Main() {Application.Run(new Form1());}
}

        
And the myBitmapResource.bmp is set to EmbeddedResource on the properties. Now when I did exactly the same on my other app which has multiple classes, it said it couldn't find myBitmapResource.bmp in Form1. You usually get this error if the bitmap isnt set to EmbeddedResource, but mine is. You also get it if the resource isnt in that form, but how can I tell where the image is in order to load it. [edited by - Malpass on May 1, 2003 6:13:40 AM]

Share this post


Link to post
Share on other sites
Advertisement

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!