Click here to Skip to main content
16,021,041 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm facing problem in displaying an background image in my window based application.

the image is visible in designer mode but not in running mode?

:doh:
Posted

Vivek Kharb wrote:
the image is visible in designer mode but not in running mode?


Check the path of the image. Looks like the relative path while running the application is somewhat different than it looks like in designer and thus no image.

Try the logic mentioned in this tip:
http://www.codeproject.com/Tips/62855/Resolving-Paths-in-a-Multi-Folder-WebSite.aspx[^]

Or else, add the image in the resource file of your application and access it. This would be better approach.
 
Share this answer
 
v2
You must import the picture to your program, go to you solution explorer, right click in your project then add existing item, them change the filter to show all archives them found you picture and import.

Obs.: My visual studio is in other language so sorry if I wrote some wrong option, but I tried to gave you the correctly location.

Hope this help.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900