Displaying text on form2 by clicking button on form1

I am working on multiple forms,What i want to do is
Click on the command button on first form and now the second form is loaded and "Hello" is printed on label of form2???Plzzz help

Comments

  • For Example:
    You have Form1 and Form2, and in Form1 have a Button1, and in Form2 have TextBox1:

    Double Click the button1 and Insert the Code like shown here.
    [code]

    Form2 oForm = new Form2();

    oForm.Show();
    oForm.TextBox1.Text = "Hello";

    [/code]

    Hope it helps though i don't specify some details. Please reply immediately when there is something wrong.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion