Click here to Skip to main content
13,043,650 members (49,700 online)
Rate this:
Please Sign up or sign in to vote.
See more:
In the winforms I have created I have some textboxes and pictureboxes. On running the form I have uploaded images in pictureboxes using fileopendialog and have used the text in textboxes. Now I want to Refresh the form, to again select some images and load. I have used this.refresh but its not giving the appropriate result, Also I don't want to use application.restart.
Thanks in advance.
Posted 25-Jun-13 20:12pm
Updated 25-Jun-13 20:26pm
Not enough information. However, if you think you need a refresh, chances are, you already done something wrong.
Member 10103134 26-Jun-13 2:23am
I cant post my whole code here because its too big. I have done many things (related to Image Processing), using the image loaded in pictureboxes and data in textbox. Any possible area, where one can commit mistakes in these situations?
I understand. Such problems are solved in this way: you create a simple project in order just to manifest on single problem. If should be as simple as possible but complete. Chances are, you will locate the problem by yourself down the road. If not, it might be good enough to post in your question.
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Post sample get correct idea about your requirements,

Here you can use same opendialog to load image again and again. and dispose the previous image if it is not needed... this.Refresh() will never give you any pop up boxes to load new images.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Maybe this help you
You can use the constructor, in a refresh button click try to close the current form and call the same form with the constructor parameters which will load with new instance.
Member 10103134 26-Jun-13 9:24am
I think it is similar to application.restart.Is it ? Can you please provide the example code or something to make it more clear ? Thanks in advance.

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 26 Jun 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100