passing data between 3 windows forms in visual studio using C#

后端 未结 5 1821
无人及你
无人及你 2021-01-27 03:23

I have a windows application which has 3 forms : Form1,2,3. I want to send text of a textbox from form2 to form1 and then that same text from for

5条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-27 03:44

    Create a Constructor which has an argument of type string in Form3.cs.

    public Form3()
    {
       InitializeComponent();
    }
    public Form3(string text):this()
    {
       this.txtName.text=text;
    }
    

提交回复
热议问题