473,375 Members | 1,307 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,375 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 4253
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.