|
楼主
发表于:
2016年:01 03 13 25 21
|
|
# 1
得分:0
回复于:
2016—01—22;52 14 25
form3是怎么来的?
|
一般可以通过构造函数传参.如果两个窗体没关系,则需要拿到窗体的句柄。
|
|
# 3
得分:0
回复于:
2016年:01 25 23 49:00
建立一个类,里面一个静态字段存放textbox的值
用了static要控制好它在哪些地方改变了值 |
|
|
#4
Score: 0
Reply to:
08:12:19 2016-01-26
Constructor pass value, or what the public variable
|
|
#5
Score: 0
Reply to:
08:46:21 2016-01-26
This I will you send the code to me, I finished it to you. This is related to which form is created. In fact, there are a lot of ways of transmission.
Global static delegate event constructor method |
|
|
#6
Score: 0
Reply to:
09:12:46 2016-01-26
If form3 was created by form2,
Data can be passed as a function of the parameters of the constructor, Or add the public attribute in form2, when the data changes in form3, while modifying the property; If form2 was created by form3, Using event mechanism, When you create a form2, the binding event Form2 data changes, triggering form3 event handler function, complete data transfer. |
|
|
|
#7
Score: 0
Reply to:
09:16:06 2016-01-26
Property, constructor, delegate, common data pool
Form2 pop form3, with properties and constructors Form3 pop form2, with properties and delegate Form2 and form3 does not matter, with the public data pool (database, XML files, static class) |
|
#8
Score: 0
Reply to:
09:26:54 2016-01-26
Basically, the ones on the floor.
Constructor, public access variable, through window handle. These can be used in several ways. |
|
|
|
#9
Score: 0
Reply to:
09:37:27 2016-01-26
Too many methods,
Constructor, static variable, entrust Here I give my example, is entrusted to pass parameters. This example is form2 click on button, then form1 to add a line of data. The principle of transfer is the same. Http://prog3.com/sbdm/blog/hanjun0612/article/details/50071539 |
|
We say that the true ah, learning!
|
|
|