11智能在线
新记
在C#中怎么调用别的窗体的控件属性
比如说 在Form2中调用 Form1中的table1.Text属性该怎样弄
举报该文章
其他看法
第1个回答 2020-10-27
需求:想在From2中调用From1的 textBox控件的text属性。
实现过程:
1、在From1中将 textBox控件的 Modifiers属性改为public
2、在From2实例化From1:
Form1 from1 = new Form1();
3、调用
if (from1.textBox1 == null)
{
}
<上一页
1
2
相似回答
大家正在搜
相关问题
如何:调用 Windows 窗体控件的属性和方法
c#中怎么在一个窗体中改变另一个窗体上的控件属性
C#中如何在一个窗体中调用另一个窗体控件中的数据?
在c#中怎么能在一个窗口中设置另一个窗口控件的属性?急急急!...
C#里怎么在一个窗体里调用另一个窗体的控件
C# 怎么在另一个类中获取窗体内textbox控件的text...
winform中如何在一个窗口中调用另一个窗口的textBo...
c#如何从另一个窗口中更改主窗口控件的属性