VB中复制-粘贴-剪切键实现

Posted 温故余学

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了VB中复制-粘贴-剪切键实现相关的知识,希望对你有一定的参考价值。

If Me.ActiveControl.GetType.BaseType.ToString = "System.Windows.Forms.TextBoxBase" Then
 Windows.Forms.SendKeys.Send("^{X}")
End If
If Me.ActiveControl.GetType.BaseType.ToString = "System.Windows.Forms.TextBoxBase" Then
 Windows.Forms.SendKeys.Send("^{C}")
 End If
If Me.ActiveControl.GetType.BaseType.ToString = "System.Windows.Forms.TextBoxBase" Then
Windows.Forms.SendKeys.Send("^{V}")
End If

Clipboard.SetText(粘贴文本信息‘)
Clipboard.GetText(获取文本信息‘)

 

以上是关于VB中复制-粘贴-剪切键实现的主要内容,如果未能解决你的问题,请参考以下文章