VB6.0怎么创建软键盘
发布网友
发布时间:2022-04-26 03:06
我来回答
共1个回答
热心网友
时间:2022-05-01 21:57
设置按钮的caption属性为你要出现的文字,代码如下
Private Sub Command1_Click()
Text1.SelText = Command1.Caption
Text1.SetFocus
End Sub
退格键代码如下
Private Sub Command2_Click()
Dim a As Integer
a = Text1.SelStart
If Text1.SelStart <> 0 Then Text1.Text = Left(Text1.Text, Text1.SelStart - 1) & _
Right(Text1.Text, Len(Text1.Text) - Text1.SelStart)
Text1.SetFocus
If a > 0 Then Text1.SelStart = a - 1
End Sub
热心网友
时间:2022-05-01 21:57
设置按钮的caption属性为你要出现的文字,代码如下
Private Sub Command1_Click()
Text1.SelText = Command1.Caption
Text1.SetFocus
End Sub
退格键代码如下
Private Sub Command2_Click()
Dim a As Integer
a = Text1.SelStart
If Text1.SelStart <> 0 Then Text1.Text = Left(Text1.Text, Text1.SelStart - 1) & _
Right(Text1.Text, Len(Text1.Text) - Text1.SelStart)
Text1.SetFocus
If a > 0 Then Text1.SelStart = a - 1
End Sub