generating shift keypress 
Author Message
 generating shift keypress

I am trying to test a textbox on a form by generating different key strokes
as if a user was sitting there using the keyboard.  The problem I have come
accross is that I am unable to generate the Shift key stroke with another
key stroke - for example I am trying to generate Shift + 3 to produce the #
but it only produces the 3.

Please Help.



Sun, 19 Sep 2004 11:44:43 GMT  
 generating shift keypress
Assuming you are using onkeydown:

this.OnKeyDown(new KeyEventArgs(Keys.D3 | Keys.Shift);

hth, Ryan


Quote:
> I am trying to test a textbox on a form by generating different key
strokes
> as if a user was sitting there using the keyboard.  The problem I have
come
> accross is that I am unable to generate the Shift key stroke with another
> key stroke - for example I am trying to generate Shift + 3 to produce the
#
> but it only produces the 3.

> Please Help.



Sun, 19 Sep 2004 12:32:08 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Generating keypress...after getting input from system hook

2. Left Shift Key OR Right Shift key is pressed

3. ASCII shift out and shift in char.

4. combobox and keyPress Event

5. Convert keypress to upper case

6. object sender keypress (c# newbie)

7. Tab KeyDown-KeyPress trapping

8. Eliminating the Bell on KeyPress event

9. Handle KeyPress during PowerPoint

10. Multiple keypress

11. Wait for keypress

12. How to Filter KeyPress?

 

 
Powered by phpBB® Forum Software