怎样使vb文本框2只获得文本框1新增字符?
1个回答
展开全部
Private Sub Text1_KeyPress(KeyAscii As Integer)
If (KeyAscii >= 32 And KeyAscii <= 126) Or KeyAscii < 0 Then
Text2.Text = Text2.Text & Chr(KeyAscii)
ElseIf KeyAscii = 22 Then
Text2.Text = Text2.Text & Clipboard.GetText
End If
End Sub
If (KeyAscii >= 32 And KeyAscii <= 126) Or KeyAscii < 0 Then
Text2.Text = Text2.Text & Chr(KeyAscii)
ElseIf KeyAscii = 22 Then
Text2.Text = Text2.Text & Clipboard.GetText
End If
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询