Changing image of PictureBoxes

  • Thread starter Thread starter Albert
  • Start date Start date
A

Albert

Hello,

I'm creating an windows application that has a picture box on it. When
you run the program, it'll have the image i put in the properties box
when I was coding. Say after two seconds, using a timer, I want to
change the image that the PictureBox is holding. How do I that? When I
publish it, and test it on another computer, it says it can't find the
required file for the SECOND image. I've been using the Load function.

Thanks

Albert
 
You say that the exception message indicates that the image file can't be
found, but you've omitted any information about the path you're setting for
the image. If you use a relative path to the image, it will be relative to
the folder in which the executing assembly resides.

--
HTH,

Kevin Spencer
Microsoft MVP

Printing Components, Email Components,
FTP Client Classes, Enhanced Data Controls, much more.
DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net
 
You say that the exception message indicates that the image file can't be
found, but you've omitted any information about the path you're setting for
the image. If you use a relative path to the image, it will be relative to
the folder in which the executing assembly resides.

--
HTH,

Kevin Spencer
Microsoft MVP

Printing Components, Email Components,
FTP Client Classes, Enhanced Data Controls, much more.
DSI PrintManager, Miradyne Component Libraries:http://www.miradyne.net

The message box that appears that says something has gone wrong,
states:

Unhandled exception has occurred in your application. If you click
Continue, the application will ignore this error and attempt to
continue. If
you click Quit, the application will close immediately.

Could not find file 'C:\Documents and Settings\Albert\Local
Settings\Apps\2.0\OEZOJHAC.OJ7\KQCYHWRD.CB7\anta..tion_8d21a
6783119ad5d_0001.0000_a8c21b3412068411\picSnowflake.bmp

I put picSnowflake.bmp in the Debug and Release folders of my
solution.

Albert
 
Back
Top