|
-
Feb 20th, 2000, 06:13 PM
#1
Thread Starter
Junior Member
Hi guys
I need help. I would like to have a new key
that does that same operation as "Ctrl+C".
I mean from ANYWHERE in windows just like
Ctrl+C, if I press, say F12, it performs
a 'COPY'.
Thanks.
Mansour.
[email protected]
-
Feb 21st, 2000, 07:02 PM
#2
This should work, use the GetAsyncKeyState to see if the F12 is pressed, if it is pressed use sendkeys to send a ctrl-c.
Code:
Option Explicit
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Private Const VK_F12 As Long = &H7B
Private Sub Command1_Click()
Do
If GetAsyncKeyState(VK_F12) <> 0 Then
SendKeys "^C"
End If
Loop Until DoEvents = 0
End Sub
------------------
Vincent van den Braken
EMail: [email protected]
ICQ: 15440110
Homepage: http://www.azzmodan.demon.nl
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|