Changing a label's text in another form in C#?

后端 未结 12 1500
日久生厌
日久生厌 2020-11-30 09:12

I have a label called LabelX1. This is on form2. On form1, i have a button. I want the button\'s text to be transferred to the other form\'s label. I have tried

<         


        
12条回答
  •  温柔的废话
    2020-11-30 09:42

    You can make labelX1 public, and it will work, but there is a better way to do this:

    http://www.codeproject.com/Articles/14122/Passing-Data-Between-Forms

提交回复
热议问题