本文介绍了文本框数据如何放入另外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
我说舔这个,请求链接 www.dreamincode/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 Subor 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 Subi'm say lick this, pleas go to link www.dreamincode/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
发布评论