471,330 Members | 1,548 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,330 software developers and data experts.

Refresh WinForm after On_Load

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

Aug 4 '05 #1
1 4163
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

"Will" wrote:
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

Aug 4 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Alex Bibiano | last post: by
8 posts views Thread by Sunil Menon | last post: by
2 posts views Thread by Luis Soler | last post: by
1 post views Thread by Will | last post: by
2 posts views Thread by aaron.kempf | last post: by
6 posts views Thread by George | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.