查看: 934|回复: 4
|
关于form transfer value的问题(vb.net)
[复制链接]
|
|
Global.vb
Dim customer_form as new frm_customer
Dim search_form as new frm_search
为什么我在 search_form那里click button1
customer_form.txt_name.text = me.txt_keyword.text
customer_form.txt_name.text 并没有显示那个数据出来的?
p/s: customer_form & search_form 都同时open着 |
|
|
|
|
|
|
|
发表于 3-5-2006 12:59 PM
|
显示全部楼层
Global.vb
Dim customer_form as frm_customer
Dim search_form as frm_search
frm_customer.vb
private sub frm_customer_load(.....)
customer_form = me
end sub
frm_search.vb
private sub frm_search_load(.....)
search_form = me
end sub
private sub button1_click(....)
customer_form.txt_name.text = me.txt_keyword.text
end sub |
|
|
|
|
|
|
|

楼主 |
发表于 4-5-2006 12:24 AM
|
显示全部楼层
行了。。。谢谢你的帮助!!
但想请问下为何加了 customer_form = me 后就可以了?
什么情况下这是需要的呢? me 的作用是,存在价值是。。? |
|
|
|
|
|
|
|

楼主 |
发表于 4-5-2006 12:30 AM
|
显示全部楼层
Global.vb
Dim customer_form as new frm_customer
Dim search_form as new frm_search
frm_customer.vb
private sub button1_click(....)
search_form.show()
end sub
为什么我close了search form后再开过时,出现以下的error msg
AN unhandled exception of type 'system.NullReferenceException' occurred in demo.exe
Additional information: Object reference not set to an instance of an object |
|
|
|
|
|
|
|
发表于 5-5-2006 11:27 AM
|
显示全部楼层
Try This
Global.vb
Dim customer_form as new frm_customer
Dim search_form as new frm_search
frm_customer.vb
private sub button1_click(....)
if search_form is nothing then search_form = new frm_search
search_form.show()
end sub
frm_search.vb
private sub frm_search_closing(.......)
search_from = nothing
end sub |
|
|
|
|
|
|
| |
本周最热论坛帖子
|