由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
DotNet版 - C# problems
相关主题
为什么web server自动改我的form actionASP.NET 难题测试 (1)
C# smart device questionASP.NET 难题测试 (2)
how to let button response 'return' key?datagrid help
How to get button name? (转载)数据绑定问题
control array in .net自动化的问题 (WebBrowser)
一道mcad考试题求解(有关DataAdapter)A VB Question from a beginner
Reference type问题A Bug about TextBox?
问题又来了.Chaago.com
相关话题的讨论汇总
话题: form2话题: c#话题: textbox话题: form话题: problems
进入DotNet版参与讨论
1 (共1页)
w*l
发帖数: 43
1
Hi, 我是C# 新手, 在WINDOWS APPLICATION, 怎样在不同FORM 间传参数和BUTTON and
TEXTBOX? If possible, give an example. Thanks.
b*e
发帖数: 3845
2
the easiest way is to make the variable public, and pass the 1st form reference
to the 2nd form, i.e. use constructor, then you can use form1.a from form2.

【在 w*l 的大作中提到】
: Hi, 我是C# 新手, 在WINDOWS APPLICATION, 怎样在不同FORM 间传参数和BUTTON and
: TEXTBOX? If possible, give an example. Thanks.

d**g
发帖数: 6
3
I think this is better:
in Form2:
private TextBox tb1;
public Form2(TextBox tb)
{
this.tb1=tb;
}
in Form1:
Form2 form2=new Form2(tb);
form2.Show();

reference
and

【在 b*e 的大作中提到】
: the easiest way is to make the variable public, and pass the 1st form reference
: to the 2nd form, i.e. use constructor, then you can use form1.a from form2.

1 (共1页)
进入DotNet版参与讨论
相关主题
Chaago.comcontrol array in .net
求教:从条形码扫描器Scanner读数据到VB .NET程序一道mcad考试题求解(有关DataAdapter)
请教:asp.net 如何使两个validation有顺序的执行Reference type问题
How to create this Asp.net Textbox问题又来了.
为什么web server自动改我的form actionASP.NET 难题测试 (1)
C# smart device questionASP.NET 难题测试 (2)
how to let button response 'return' key?datagrid help
How to get button name? (转载)数据绑定问题
相关话题的讨论汇总
话题: form2话题: c#话题: textbox话题: form话题: problems