更改2个文本框的值(VS.NET)

时间:2016-09-14 13:25:08

标签: vb.net visual-studio

我想知道当我点击按钮时如何相互更改2个文本框的值。 vs.net

1 个答案:

答案 0 :(得分:0)

这很容易:)

'Values to Store the text
Dim textbox1 as String
Dim textbox2 as String
textbox1 = mytextbox1.text
textbox2 = mytextbox2.text

mytextbox1.text = textbox2
mytextbox2.text = textbox1

这也是可能的

'Values to Store the text
Dim textbox1 as String
textbox1 = mytextbox1.text

mytextbox1.text = mytextbox2.text
mytextbox2.text = textbox1

干杯:)