vb.net发送变量b / w表单 [英] vb.net sending a variable b/w forms
本文介绍了vb.net发送变量b / w表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在表格之间发送变量
请发送答案
how to send a variables between the forms
please send answers
推荐答案
将变量从form1传递给form2
在表格2中首先声明Varible .....
Passing a variable from form1 to form2
In Form 2 first declare the Varible.....
public var1 as string
然后在form1 ....
Then in form1....
Dim f as new form2
f.var1 = "Testing"
f.show
in the form2的load事件放入以下代码:
in the load event of form2 put the following code:
messagebox.show var1
看起来你还在学习....在你谷歌的答案之前,谷歌的Visual Basic For Beginners:)
It looks like you are still learning.... Before you Google for the answer, Google for "Visual Basic For Beginners" :)
Google真的已损坏 [ ^ ]地方?
一个简单的搜索给了我大约1,530,000个结果(0.27秒)。
无论如何,请查看CP上的以下链接。应该有所帮助:
在vb.net中传递两个表单之间的值 [ ^ ]
Is Google really broken [^]at your place?
A simple search has given me about 1,530,000 results in (0.27 seconds).
Anyway, look at the following link on CP. Should help:
Pass value between two form in vb.net[^]
我不确定你想要达到什么目的(请参阅我的评论问题),但它是一个基本的知识...
Visual Basic中的范围 [ ^ ]
Microsoft .NET中的变量和方法范围 [ ^ ]
如果您想知道如何在表单之间传递数据,请使用SearchBox [ ^ ]。有大量的信息。
I'm not sure what do you want to achieve (see my comment to the question), but it's a basic knowledge about ...
Scope in Visual Basic[^]
Variable and Method Scope in Microsoft .NET[^]
If yout want to know how to pass data between forms, use SearchBox[^]. There is tons of information about it.
这篇关于vb.net发送变量b / w表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文