文本框数据如何放入另外2个文本框? Vb.Net

编程入门 行业动态 更新时间:2024-10-23 17:23:32
本文介绍了文本框数据如何放入另外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 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 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

本文发布于:2023-11-03 20:31:54,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1556015.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文本框   放入   数据   Net   Vb

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!