943,731 Members | Top Members by Rank

Ad:
  • C# Discussion Thread
  • Marked Solved
  • Views: 4433
  • C# RSS
Nov 15th, 2008
0

How to send left/right shift key?

Expand Post »
Hi
The System.Windows.Forms.SendKeys.Send method does not support sending Left or Right shift key. How can I send these keys in C#?

thanks in advance
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
MRafeie is offline Offline
9 posts
since Apr 2008
Nov 15th, 2008
0

Re: How to send left/right shift key?

SendKeys.Send("{your key code here}");
Reputation Points: 11
Solved Threads: 16
Junior Poster
Jugortha is offline Offline
172 posts
since Oct 2007
Nov 16th, 2008
0

Re: How to send left/right shift key?

What do you mean?!!!!!!!
SendKeys.Send("+") sends shiftKey only. But Right shift key, for example, can not be distinguished by this way.
Last edited by MRafeie; Nov 16th, 2008 at 1:50 am.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
MRafeie is offline Offline
9 posts
since Apr 2008
Nov 16th, 2008
0

Re: How to send left/right shift key?

Reputation Points: 293
Solved Threads: 82
Posting Whiz
Antenka is offline Offline
361 posts
since Nov 2008
Nov 17th, 2008
0

Re: How to send left/right shift key?

I tried keybd_event API function, but it doesn't work as expected! It can Not process Left or Right shift key correctly! This function only process Shift key. Take a look at this:
http://msdn.microsoft.com/en-us/libr...04(VS.85).aspx
Quote ...
Windows NT/2000/XP/Vista:This function has been superseded. Use SendInput instead.
Therefore, I tried to use SendInput function. But I couldn't! After that I found another note:
http://www.pinvoke.net/default.aspx/user32.SendInput
Quote ...
* VK_L* & VK_R* - left and right Alt, Ctrl and Shift virtual keys. * Used only as parameters to GetAsyncKeyState() and GetKeyState(). * No other API or message will distinguish left and right keys in this way. */
Now, Can anyone tell me how to send Left/Right Shift key?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
MRafeie is offline Offline
9 posts
since Apr 2008
Nov 23rd, 2008
0

Re: How to send left/right shift key?

My problem has been solved in MSDN C# general forum! You can refer to the following link:
http://social.msdn.microsoft.com/For...0-6d533def38a5
Reputation Points: 10
Solved Threads: 0
Newbie Poster
MRafeie is offline Offline
9 posts
since Apr 2008

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C# Forum Timeline: Help with Balance
Next Thread in C# Forum Timeline: read from exel file c#





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC