|
-
May 2nd, 2001, 01:40 PM
#1
Thread Starter
Hyperactive Member
SendKeys
How do I send the Windows key useing sendkeys. I thinks it's ascii code is 91.
-Thanks.
W#Ć€V€® W¦|| ߀ W¦|| ߀, ÄÑÐ †#€®€ ¦§ ÑÖ†#¦Ñ6 ¥Öµ ©ÄÑ ÐÖ ÄßÖµ† ¦†, §Ö §¦† ßÄ©K, ®€|ÄX ÄÑÐ |€† ¦† #ÄÞÞ€Ñ.
(Whatever will be will be, and there is nothing you can do about it, so sit back, relax and let it happen.)
-
May 2nd, 2001, 02:08 PM
#2
Thread Starter
Hyperactive Member
SOme one must know!
W#Ć€V€® W¦|| ߀ W¦|| ߀, ÄÑÐ †#€®€ ¦§ ÑÖ†#¦Ñ6 ¥Öµ ©ÄÑ ÐÖ ÄßÖµ† ¦†, §Ö §¦† ßÄ©K, ®€|ÄX ÄÑÐ |€† ¦† #ÄÞÞ€Ñ.
(Whatever will be will be, and there is nothing you can do about it, so sit back, relax and let it happen.)
-
May 2nd, 2001, 02:10 PM
#3
PowerPoster
Damn, I saw this asked a long time ago. I can't remeber. I can't try this right now, but maybe this?
I'll keep searching thru the threads
-
May 2nd, 2001, 02:11 PM
#4
The Windows key is basically Ctrl+Escape.
And here's the code to call it.
Code:
Private Declare Sub keybd_event Lib "user32.dll" (ByVal bVk As _
Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo _
As Long)
Private Const KEYEVENTF_KEYUP = &H2
Private Sub Command1_Click()
keybd_event vbKeyControl, 0, 0, 0
keybd_event vbKeyEscape, 0, 0, 0
keybd_event vbKeyEscape, 0, KEYEVENTF_KEYUP, 0
keybd_event vbKeyControl, 0, KEYEVENTF_KEYUP, 0
End Sub
-
May 2nd, 2001, 02:15 PM
#5
PowerPoster
Yep, I knew it was control - Escape, I think my syntax was correct, not sure though..
-
May 2nd, 2001, 02:19 PM
#6
Thread Starter
Hyperactive Member
Thanks Matthew Gates
W#Ć€V€® W¦|| ߀ W¦|| ߀, ÄÑÐ †#€®€ ¦§ ÑÖ†#¦Ñ6 ¥Öµ ©ÄÑ ÐÖ ÄßÖµ† ¦†, §Ö §¦† ßÄ©K, ®€|ÄX ÄÑÐ |€† ¦† #ÄÞÞ€Ñ.
(Whatever will be will be, and there is nothing you can do about it, so sit back, relax and let it happen.)
-
May 2nd, 2001, 02:23 PM
#7
Originally posted by Lethal
Damn, I saw this asked a long time ago. I can't remeber. I can't try this right now, but maybe this?
I'll keep searching thru the threads
That won't work Lethal, SendKeys is being stubborn .
-
May 2nd, 2001, 02:26 PM
#8
PowerPoster
Ahh...Sendkeys does act kinda flaky sometimes..Logically it should, but the API is the way 2 go as you mentioned..
-
May 2nd, 2001, 02:27 PM
#9
Frenzied Member
Does this work
SendKeys "{^ESC}"....If I remember right you need to use these {} when dealing with special keys like tab, enter...etc.
Maybe I'm thinking of something else
-
May 2nd, 2001, 02:46 PM
#10
But that doesn't work and niether does the code above.
-
May 2nd, 2001, 02:50 PM
#11
Frenzied Member
Ahhhh...Sendkeys doesn't cover all the keys. I'd go with the API myself. The added benefit is you don't get your "Num Lock" indicator flashing.
-
May 2nd, 2001, 05:02 PM
#12
Re: SendKeys
Originally posted by TiPeRa
I thinks it's ascii code is 91.
-Thanks.
By the way,
Chr(91) = [
-
May 2nd, 2001, 05:07 PM
#13
Hyperactive Member
does any body...
know who to send ctrl alt del at the same time
-
May 2nd, 2001, 05:16 PM
#14
You cannot simulate the Ctrl+Alt+Del combination. As I understand, MS made it so this event will only occur if the hardware (keyboard) sends a signal.
-
May 2nd, 2001, 06:23 PM
#15
Hyperactive Member
-
May 2nd, 2001, 06:39 PM
#16
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
|