| Author: Kapil Dhawan 17 Jun 2008 | Member Level: Gold Points : 2 |
Hello Nice piece of code Thanks for sharing your knowledge with us. I hope to see more good code from your side This code is going to help lots of guys. Ton Thanks to you Regards, Kapil
|
| Author: UltimateRengan 04 Jul 2008 | Member Level: Diamond Points : 1 |
hi, Really nice.thanks for sharing your knowledge with us.
|
| Author: Bindu Bujji 12 Jul 2008 | Member Level: Gold Points : 2 |
Hi, When i tried to use this, getting RTE "Error 1 'form1.Form2.txtform2' is inaccessible due to its protection level"
Here is my sample code: FORM1 ======= private void button1_Click(object sender, EventArgs e) { //txtForm1 --> name of textbox in form1 //txtform2 --> name of textbox in form2 Form2 frm2obj = new Form2(); frm2obj.txtform2.value = txtForm1.Text; frm2obj.Show(); }
------------
//FORM2
private string tempValue;
public string form1Textvalue { get {return tempValue;} set { tempValue = value;} }
private void Form2_Load(object sender, EventArgs e) { txtform2.Text = tempValue; }
THANKS Bindu
|
| Author: Bindu Bujji 12 Jul 2008 | Member Level: Gold Points : 2 |
Hi, When i tried to use this, getting RTE "Error 1 'form1.Form2.txtform2' is inaccessible due to its protection level"
Here is my sample code: FORM1 ======= private void button1_Click(object sender, EventArgs e) { //txtForm1 --> name of textbox in form1 //txtform2 --> name of textbox in form2 Form2 frm2obj = new Form2(); frm2obj.txtform2.value = txtForm1.Text; frm2obj.Show(); }
------------
//FORM2
private string tempValue;
public string form1Textvalue { get {return tempValue;} set { tempValue = value;} }
private void Form2_Load(object sender, EventArgs e) { txtform2.Text = tempValue; }
THANKS Bindu
|
| Author: Vidhya 18 Jul 2008 | Member Level: Gold Points : 2 |
hi,
Really nice.thanks for sharing your knowledge with us.
You should create the instance to driving from to another form....
that is if you are pass the value from form1 to form2, you should create an instance for form1 in form2.....
for example:
form1 f1=new form1();
here f1 is the instance...
using this instance f1, you can access the value or pass the value from one form to another form...........
using this instance u can pass properties,classes,events, functions......
u must modify those details which are passed by you,as public.....
unless you can't access those details even if u have an instance .....
make sure that.....
Regards, Vidhya.....
|
| Author: Siva Sankari 29 Jul 2008 | Member Level: Gold Points : 0 |
Hi,
Nice code!.
Thanks For Sharing!
Sankari.
|
| Author: UltimateRengan 29 Jul 2008 | Member Level: Diamond Points : 0 |
hi,
nice one thanks for sharing ur knowledge
|
| Author: sreenu 06 Aug 2008 | Member Level: Bronze Points : 1 |
Hi, I am new to c#.NET Here, i am getting the value into form2. And my doubt is.. How can we store these values in a string (in form2)and how can we use these string values in form2.
Thank You.
|