473,320 Members | 2,083 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 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 4252
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Alex Bibiano | last post by:
I have a typed dataset in my WinForm and a textbox with databinding to the dataset (all without code). Now, in a button event, I assign a new dataset (retrieved from a function) to the dataset a...
8
by: Sunil Menon | last post by:
Dear All, We are developing applications in ASP.Net...in one of our applications we would like to use a GridControl...we have tried to use a Server-Side Grid control but found the speed to be an...
2
by: Luis Soler | last post by:
Hi: Can I lock refresh of winform to avoid to visualize some temporary changes ? I am changing bindincontext of some controls to do certain checkings and I don't want that the user sees the...
1
by: Will | last post by:
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...
2
by: aaron.kempf | last post by:
hey guys i have an ETL winform in VB 2005 and it's like-- off in la-la land. i know it's doing things-- it's happily crunching away. but i'm confused about what i need to do to make the main...
6
by: George | last post by:
Hi, I have been encountering a refresh problem with DataGridView, which is bound to a DataTable. When I make updates (Add, Delete, update) to the DataGridView, everything flow nicely to...
5
by: sp | last post by:
Hello I have a problem with the refresh performance in datagrid – when datagrid is being shown it is so slow that I can see one by one cells is drawn -datagrid contains about 35x40 of...
2
by: jyanmin.fang | last post by:
Hi, In my current project, I need to embed an .NET winform usercontrol in the aspx page (via <Objecttag). This winform usercontrol has an event called DoEvent (void DoEvent()). This winform...
14
by: Monty | last post by:
Hello, I have created a solution which has both a web UI and a winform UI, the latter is just for administrators. The Web UI (a Web Application Project) and the winform project both...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.