Click to See Complete Forum and Search --> : Working with multiple forms


dannytan
March 12th, 2003, 07:10 AM
hi all. I wanted to design a simple student registration system. in my design, i have 2 forms. Form1 consist of a ListView control displaying all the student information. Also, inside Form1 there is a button to Add new student. When a user presses the Add button, a new form will pops up which is the Form2. Inside form2 there are a lots of text boxes for users to input data. I would like to know how in Form1 that I could retrieve the data entered by the user in Form2. Thanks

pareshgh
March 12th, 2003, 01:27 PM
make all member variables of Form2 as public that u want to access.

and you can access as object members.

paresh

GMV
March 12th, 2003, 02:50 PM
Hi!
You can also make your TextBox public and use it in Form1. See attachment.

pareshgh
March 12th, 2003, 03:06 PM
that's what I said in my early post. that's for the sample though. I am bit lazy these days
:D :D :D

GMV
March 12th, 2003, 03:23 PM
Hi!
I think it is pretty good to be little busy. I just finished some project for client and now I have not any task.

pareshgh
March 12th, 2003, 03:32 PM
so you can answer here some of the post and do some research

:D ;)

Lasher V. Mellon
March 30th, 2003, 01:43 PM
Thanks for the code sample! I was entering
"Form Form2 = new Form2();" not
"Form2 Form2 = new Form2();"

I couldn't figure out why none of my Form2 methods or variables were showing up! It wasn't an access level problem, it was that I was instantiating a generic Form and not my specific Form2!

Just when I think I understand this stuff I make another newbie mistake that takes hours to figure out. :(

Thank you for your help!
Lash

pareshgh
April 1st, 2003, 02:41 PM
if you have any problems then let us know here , any GURUS out here will figure out :D :D :D