473,396 Members | 1,797 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,396 software developers and data experts.

How to refresh a form

2
Hi,

Am using C# language.
I got two forms Form1 and Form2. By clicking the ADD button from the Form1, i ll be moved to Form2, which allows me to append some details in this form. After appending the data when i click SAVE button in Form2, my Form1 should be refreshed. Can anyone tell me how do i refresh the First form from the Secondform?

tanx
Diya.S
Oct 6 '07 #1
4 1158
Firecore
114 100+
Hi,

Am using C# language.
No idea how to do wat uve asked. But it might help putting your answer in the right forum.

This is the C/C++ forum.

I think you have to use the .NET forum for C#.
Oct 6 '07 #2
weaknessforcats
9,208 Expert Mod 8TB
Moving this to the .NET forum.
Oct 6 '07 #3
bhappy
139 100+
HI,

Create Instance for Form1() in Form2().

In Form2() Before calling Form1() Add This Code.

obj=new Form1()
obj.Form1_Load(sender,e)
obj.show()

I hope it will Help's U.
Oct 10 '07 #4
Shashi Sadasivan
1,435 Expert 1GB
hi


in Form1 where you call form2.

Expand|Select|Wrap|Line Numbers
  1.  Form2 frm2 = new Form2(); 
  2. frm2.ShowDialog();
  3. this.refreshDetails();
  4.  
You should create a method refreshDetails where all the code goes ni for refresing those parts you want to.
Showdialog will open form2 and keep it focused until form2 has been closed.Once closed the refreshDetails will be called.

cheers
Oct 10 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: John Baker | last post by:
Hi: I have a Pop Up form that involves a main form and sub form. The sub form has the results of a query on the main form. I need to automatically perform exactly he same action that takes...
5
by: Andrew Chanter | last post by:
I have a situation where I am using an unbound dialog form to update data in an Access 2002 split back end / front end scenario. The data update is done via an ADO call (direct to the back end...
2
by: S. van Beek | last post by:
Dear reader, I have a strange situation. In a Form with a list box to search for a record in the form it self. The field in the list box is also available in the form. On an other...
2
by: Peter Oliphant | last post by:
I now have graphics being drawn in the Paint event of my form (yeah, and it's very cool). Problem was that it only updated any changes to these graphics when Paint was called. So, I then made it...
10
by: tasmisr | last post by:
This is an old problem,, but I never had it so bad like this before,, the events are refiring when clicking the Browser refresh button. In the Submit button in my webform, I capture the server side...
6
by: scott | last post by:
I guess this is a simple one but I can't seem to get it to work. I want to refresh an open form "onClose" of another. I have a Close button on a form which has User Details on it. If I update...
2
by: Robert | last post by:
I am trying to give the user dynamic search capabilities to select almost any record in the database from criteria they select. Everything seems to work except when I open the display form to...
12
by: martin1 | last post by:
All, is there window form refresh property? I try to set up window form refresh per minute. Thanks
5
by: tshad | last post by:
I have an interface I am using to get access to some of the objects on my form: a textbox (Status) and my statusbar (StatusBar). In my class, which is actually in another class from my form I have...
5
by: BlackBox | last post by:
I have a Listbox1 in the main form and I can add listbox1 items in the parent form. But when I close the parent form Listbox1 in the main form does not get refresh. I need to re-open the app. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.