在Form2中调Form1:
string aa = Form1.texbox1
string aa = Form1.texbox1
解决方案 »
- 关于datagridview程序中自己选择当前行的问题
- PictrueBox 控件颜色问题
- 如何利用.net的MD5类获得16位加密串
- 验证控件菜鸟问题:我的TextBox为了验证将AutoPostBack=true,后表单输入完页面就抖动,如何让页面不抖动?
- bindingSource结束编辑问题
- 简单问题,关于数据库打包问题!
- 如何自定义设计DataGrid(web控件)显示样式;多谢关注....
- webapplication中写入数据库?
- WPF,这种数据绑定怎么写?
- 如何用C#做web控件,以至网站如何调用!
- 同步连接与异步连接有什么区别,我不是很明白
- 如何让TextBox控件只能接受键盘的Delete而不能接受其他的键盘操作?
然后访问代码如下:
Form2 frm=new Form2();
this.Text=frm.textBox1.Text;
在你的Form2中另入一个变量
public string text1
{
get
{
return textBox1.Text;
}
set
{
textBox1.Text = value;
}
}
这样在form1中的取Form2的textBox1的值就可以如下:
Form2 frm2=new Form2();
this.Text=frm2.text1;
这样就可以了
http://www.csdn.net/Expert/TopicView1.asp?id=877352