发布网友 发布时间:2022-04-22 08:31
共2个回答
热心网友 时间:2022-06-18 16:36
Private Sub 复制_Click()
If Text1.SelText <> "" Then
Clipboard.SetText Text1.SelText
End If
End Sub
Private Sub 剪切_Click()
If Text1.SelText <> "" Then
Clipboard.SetText Text1.SelText
Text1.SelText = ""
End If
End Sub
Private Sub 粘贴_Click()
Text1.SetFocus
If Trim(Clipboard.GetText) <> "" Then
If Text1.SelStart = 0 Then
Text1.Text = Clipboard.GetText & Text1.Text
ElseIf Text1.SelStart = Len(Text1.Text) Then
Text1.Text = Text1.Text & Clipboard.GetText
Else
Text1.Text = Left(Text1.Text, Text1.SelStart) & Clipboard.GetText & Right(Text1.Text, Len(Text1.Text) - Text1.SelStart)
End If
End If
End Sub
热心网友 时间:2022-06-18 16:37
Private Sub Command1_Click()
If Text1.Text <> "" Then
Clipboard.SetText Text1.Text
Text1.Text = ""
End If
End Sub
Private Sub Command2_Click()
If Text1.Text <> "" Then
Clipboard.SetText Text1.Text
End If
End Sub
Private Sub Command3_Click()
Text1.SetFocus
If Trim(Clipboard.GetText) <> "" Then
If Text1.SelStart = 0 Then
Text1.Text = Clipboard.GetText & Text1.Text
ElseIf Text1.SelStart = Len(Text1.Text) Then
Text1.Text = Text1.Text & Clipboard.GetText
Else
Text1.Text = Left(Text1.Text, Text1.SelStart) & Clipboard.GetText & Right(Text1.Text, Len(Text1.Text) - Text1.SelStart)
End If
End If
End Sub