|
-
Sep 4th, 2010, 09:10 AM
#7
Frenzied Member
Re: Obtaining current directory correctly
Assuming you are using Visual Studio 2005+:
Project > Properties (Found At The Bottom) > Resources > Add Existing Item
Then if, for example, your project is called HelloWorld and the image you added was called shark.jpg use the following code to get the image.
Code:
HelloWorld.Properties.Resources.shark
Notice how there is no file extension to shark.
Intellisense will provide you with all the resources you have added.
Take a look at the In This Section in this link: http://msdn.microsoft.com/en-us/library/9za7fxc7.aspx
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|