|
-
October 10th, 2002, 07:11 AM
#1
Referencing an existing Form
Hi.
This might be a very basic queston but pls. excuse my ignorance for this.
I am developing a VB.NET Windows based application.
My Application has got 3 Forms Namely :
Form1
Form2
Form3
My Startup Form is Form1
In the Form_Load Event of Form1, I make an instance of Form2 and open it.
In the Form_Load event of Form2, I make an instance of Form3 and open it.
In my Form3 I have a button.
Now on the Button_Click event in Form3 I want to activate Form1.
How can I acheive this because I don't have the reference of exixting Form1.
Pls. help me to get this thing sorted out.
Regards.
-
October 10th, 2002, 08:18 AM
#2
You need to pass a reference when (after) you create each form, like:
dim Frm2 as form2 = new form2()
frm2.Parent = me
Of course you'll have to define a Property called Parent in form2, and form3 etc. But then you'll have the reference you need.
-
October 10th, 2002, 10:24 PM
#3
Errmmm, DSJ do you know where i can learn more on this or can you elaborate here. I'm trying to do this with my second project but i don't know how to start.
-
October 14th, 2002, 08:33 AM
#4
Try this link, it describes exactly what you want:
http://msdn.microsoft.com/library/en...lBasicNETUpgra<br%20/>dingToNET.asp
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|