Refresh WinForm after On_Load

  • Thread starter Thread starter Will
  • Start date Start date
W

Will

Not sure the easiest way to ask this so I will give a small example of
what I want to accomplish.

Create a VB.Net WinForm Application with two forms. On the first form,
two textboxes and a button that hides the current form and shows the
second form. On showing the second form for the first time the
On_Form_Load event is kicked off and the data in the two textboxes is
added up and displayed in a label. A button on the second form allows
you to hide the current form and show the first form again. After
going back to the first form, change the data and hit the button to go
back to the second form. At this point the On_Form_Load event does not
kick off and the new data is not summed. Is there a way to
programmatically kick this event off when the user goes back to the
second form?

Thanks
 
There are a number of different events that you could put your code in, for
example:

GotFocus
Paint
Activated

Try putting the code in one of these events instead of in the Form Load event.

Hope this Helps

Brian Delahunty
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top