想在文本框里 按下键盘 a 时 会自动完成文本框选黑文字的复制 相当按下ctrl+c 这样复制程序里边文本框的东西就不用老按ctrl+c 直接按 键盘 字母a 就行了Private Sub Form_Load()Form1.KeyPreview = TrueEnd SubPrivate Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 65 Then
sendkey "^c"
End If我想用这段代码 可以用不了 复制不了 按a 时 ,请问 sendkey "^c" 这段要怎么修改才可以 或者着应该用其他代码
If KeyCode = 65 Then
sendkey "^c"
End If我想用这段代码 可以用不了 复制不了 按a 时 ,请问 sendkey "^c" 这段要怎么修改才可以 或者着应该用其他代码
Me.KeyPreview = True
End SubPrivate Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 97 Then
KeyAscii = 0
Clipboard.Clear
Clipboard.SetText Text1.SelText
End If
End Sub