在VB制作剪贴板
2个回答
展开全部
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
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
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
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
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
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询