i would like to insert pic using a code.

for instance, when i click on a button, picture1(.jpg) will appear on a form. however, when the picture1 at a location is replaced by picture2, the c# application will also change to picture2. Is it possible to do so?

I know how to insert pic using the picture box found in the toolbox. however when the location at which picture1 is changed to picture2, the picture in c# application cannot change.

Can you help pls?


8 Years
Discussion Span
Last Post by mlady

I think you mean if a picture file on the harddisk is replaced by a different one, you want that picture in your program to change as well... Correct? maybe?


Firstly if u want good solution write more clearly.

Anyways what i understood is say at C:\ there is a pic caroline.jpg
now suppose the file with the same name replaces it but dynamically u want that pic to be loaded in ur application.

Good one!

Look try creating a timer thread which will look for that file and will load it only if it changes. Match the date/time of file created to do this and load if required.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.