• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 270
  • Last Modified:

reloading windows form

I have a form where you can update certain variables stored and retrieved from the database

Form2 shows a company Name, it is retrieved in the form load event
from from2 I can call form3, form 3 allows me to change the company name.

When I press Save it updates the company name in the Database
at this point I would like to refresh / reload Form2 which displays the company name
1 Solution
Mike TomlinsonMiddle School Assistant TeacherCommented:
"it is retrieved in the form load event"

Move that code into a sub that can be called from both the Load() event and when when you want to update the form when Form3 is closed.  From Form2, display Form3 with ShowDialog() so that when Form3 is dismissed you can immediately call your new method to refresh the form.

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now