16,554
社区成员
发帖
与我相关
我的任务
分享
Dim i As Integer
Private Sub TextBox1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.GotFocus
i=1
End Sub
Private Sub TextBox2_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox2.GotFocus
i=2
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If i = 1 Then
TextBox1.AppendText("1")
ElseIf i =2 Then
TextBox2.AppendText("1")
End If
End Sub