文本框数据如何放入另外2个文本框? Vb.Net [英] Text Box Data How To Put Into Another 2 Text Boxes ? Vb.Net

查看:122
本文介绍了文本框数据如何放入另外2个文本框? Vb.Net的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

文本框1,2和3是文本框。

一二三四五六七八九十是文本框中的单词1.



如何放置文字框2和文本框3应填写文字框1中的单词。完全填写文本框2后,应填写下一个文本框3?

解决方案

处理来自firts文本框的按键事件...并将值放入其他两个文本框中...



例子(Keypress):



 私有  Sub  TextBox1_KeyPress( ByVal  sender 作为 对象 ByVal  e 作为 System.Windows.Forms.KeyPressEventArgs)句柄 TextBox1.KeyPress 
Dim valueTextBox1 作为 字符串
valueTextBox1 = .TextBox1.Text
.TextBox2.Text = valueTextBox1
.TextBox3.Text = valueTextBox1
结束 Sub





或事件文本更改.....

 私有  Sub  TextBox1_TextChanged( ByVal  sender 作为 对象 ByVal  e  As  System.EventArgs)句柄 TextBox1.TextChanged 
Dim valueTextBox1 As String
valueTextBox1 = .TextBox1.Text
.TextBox2.Text = valueTextBox1
.TextBox3.Text = valueT extBox1
结束 Sub


我说舔这个,请求链接



http://www.dreamincode.net/forums/ topic / 347220-text-box-data-how-to-put-into-2-text-boxes-vbnet / [ ^ ]

构建您自己的控件并在其中包含2个文本框


textbox 1, 2 and 3 are the text boxes.
"one two three four five six seven eight nine ten" are words in the text box 1.

how to put word text box 2 and text box 3 should be fill with word from text box 1 . After filling the text box2 completely the next textbox 3 should be filled?

解决方案

Handled the keypress event from the firts textbox... and put the value in the others two...

example(Keypress):

Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
     Dim valueTextBox1 As String
     valueTextBox1 = Me.TextBox1.Text
     Me.TextBox2.Text = valueTextBox1
     Me.TextBox3.Text = valueTextBox1
 End Sub



or with the event text change.....

Private Sub TextBox1_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
      Dim valueTextBox1 As String
      valueTextBox1 = Me.TextBox1.Text
      Me.TextBox2.Text = valueTextBox1
      Me.TextBox3.Text = valueTextBox1
  End Sub


i'm say lick this, pleas go to link

http://www.dreamincode.net/forums/topic/347220-text-box-data-how-to-put-into-another-2-text-boxes-vbnet/[^]


Build your own control and include 2 text box in it


这篇关于文本框数据如何放入另外2个文本框? Vb.Net的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆