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('获取文本信息')

 

posted @ 2016-03-30 11:46  温故余学  阅读(859)  评论(0编辑  收藏  举报