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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

passing reference to a form from another form

Status
Not open for further replies.

raydona

Programmer
May 12, 2005
27
GB
I have a Windows Forms Application project with multiple forms. How can I jump from one form to another without having to create the form, that is, how can I pass a reference to Form_A to another form, say, Form_T? In other words inside Form_T instead of saying:
Form_A ^ x = gcnew Form_A();
x.Show();

how can I pass a reference to Form_A, created elsewhere, to x.
I would be very grateful for all help.
 
Now, if I understand you correctly, you want to pass a reference of an item that doesn't exist to another item???

I'm not understanding the reason for atempting something like this. If there's something within Form_A that you need in Form_T, then it should be encapsulated out of the Form so that it's available.

If Form_T needs to DO something with Form_A, then it should be instantiated and pass a reference to the object just as you would any other object.

im in ur stakz, overflowin ur heapz!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top