954,500 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

send information to another forms

Hello
I want to send information from textbox1 in (form1) to textbox2 in (form2) .
How can i do it?
please hellp me
thank you

ali_khodayar
Newbie Poster
1 post since Dec 2009
Reputation Points: 10
Solved Threads: 0
 

There are many ways to do that. Try this:

In Form2, set the Modifiers property of textbox1 to "Public". If you want to get access to Form1's textbox in Form2 then also do this for the textbox in Form1. (screenshot)

And use this code in Form1:

Form2 form2;

        public Form1()
        {
            InitializeComponent();

            form2 = new Form2();

            // You can send info to Form2's textbox this way:
            form2.textBox1.Text = "set text";
        }


Thanks

farooqaaa
Posting Whiz in Training
295 posts since Jul 2008
Reputation Points: 61
Solved Threads: 71
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: