Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

opening form

Status
Not open for further replies.

tek1ket

MIS
Jan 25, 2009
70
IR
i have 2 forms in my app. at first form1 should be opened by which i can select which projects i want to work on. for openning the form2 (which contains all data related to selected project) i have used this code

MainMDI myForm=new MainMDI();
myForm.Text=lstProject.Text;
myForm.IdProj=IdProject;
myForm.Show();
this.Hide();

which i don't whether is a good idea or not.
now in form 2 i have a menu named "Open a Project", by clicking on the form1 should be opened again and the selected projected's been changed, so all data in form2 should be changed also, the probelm is here:

a new instance of form2 with data of new selected projected is opened.which i want it should be shown on first instance of form2.

thank you fro your help.
 
Look into delegates for communication between forms. There are plenty of examples online.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top