Click here to Skip to main content
15,894,337 members
Home / Discussions / C#
   

C#

 
AnswerRe: how to draw a rectangle on the picture box Pin
Pete O'Hanlon14-Oct-10 23:41
mvePete O'Hanlon14-Oct-10 23:41 
QuestionForm loses focus [modified] Pin
electriac14-Oct-10 13:05
electriac14-Oct-10 13:05 
AnswerRe: Form loses focus Pin
fjdiewornncalwe14-Oct-10 13:17
professionalfjdiewornncalwe14-Oct-10 13:17 
GeneralRe: Form loses focus Pin
electriac14-Oct-10 13:24
electriac14-Oct-10 13:24 
GeneralRe: Form loses focus Pin
Nish Nishant14-Oct-10 13:33
sitebuilderNish Nishant14-Oct-10 13:33 
GeneralRe: Form loses focus Pin
fjdiewornncalwe14-Oct-10 13:35
professionalfjdiewornncalwe14-Oct-10 13:35 
GeneralRe: Form loses focus Pin
electriac14-Oct-10 14:00
electriac14-Oct-10 14:00 
GeneralRe: Form loses focus [modified] Pin
fjdiewornncalwe14-Oct-10 14:08
professionalfjdiewornncalwe14-Oct-10 14:08 
I see what you want now, and no, the .Focus() won't do the trick.
My question is whether you are trying to capture keystrokes in a generic manner and then pass on the relevant ones to the child form?

The issues may lie with where the focus lies. The keypress arguments are going to be sent from whichever control has the focus, not the form itself, so you won't see the event using the hooks you have. What you need to do is capture the keypress event from whichever control happens to have the focus on the active form and then pass the keystroke event down to the sub form for it to use it. If you tell me which version of Studio you're using, I can package up a sample I just made to demonstrate this and send it to you. You can email me that at [edited out now that you've gotten it], if you like.

modified on Thursday, October 14, 2010 8:50 PM

GeneralRe: Form loses focus Pin
electriac14-Oct-10 14:14
electriac14-Oct-10 14:14 
GeneralRe: Form loses focus Pin
OriginalGriff15-Oct-10 2:03
mveOriginalGriff15-Oct-10 2:03 
GeneralRe: Form loses focus Pin
fjdiewornncalwe15-Oct-10 4:32
professionalfjdiewornncalwe15-Oct-10 4:32 
QuestionRe: Form loses focus Pin
Luc Pattyn15-Oct-10 2:19
sitebuilderLuc Pattyn15-Oct-10 2:19 
AnswerRe: Form loses focus Pin
electriac15-Oct-10 2:35
electriac15-Oct-10 2:35 
GeneralRe: Form loses focus Pin
Luc Pattyn15-Oct-10 2:46
sitebuilderLuc Pattyn15-Oct-10 2:46 
GeneralRe: Form loses focus Pin
fjdiewornncalwe15-Oct-10 4:36
professionalfjdiewornncalwe15-Oct-10 4:36 
AnswerRe: Form loses focus Pin
fjdiewornncalwe15-Oct-10 4:33
professionalfjdiewornncalwe15-Oct-10 4:33 
GeneralRe: Form loses focus Pin
Paw Jershauge15-Oct-10 1:38
Paw Jershauge15-Oct-10 1:38 
QuestionHow to put a rsa private key "hiden" in the code, and encrypt something with RSA! Sending the public key to decrypt. Pin
Ongcos14-Oct-10 7:04
Ongcos14-Oct-10 7:04 
AnswerRe: How to put a rsa private key "hiden" in the code, and encrypt something with RSA! Sending the public key to decrypt. Pin
Alegria_Lee14-Oct-10 21:05
Alegria_Lee14-Oct-10 21:05 
GeneralRe: How to put a rsa private key "hiden" in the code, and encrypt something with RSA! Sending the public key to decrypt. Pin
Ongcos14-Oct-10 22:21
Ongcos14-Oct-10 22:21 
GeneralRe: How to put a rsa private key "hiden" in the code, and encrypt something with RSA! Sending the public key to decrypt. [modified] Pin
Ongcos15-Oct-10 2:05
Ongcos15-Oct-10 2:05 
GeneralRe: How to put a rsa private key "hiden" in the code, and encrypt something with RSA! Sending the public key to decrypt. Pin
Alegria_Lee15-Oct-10 3:06
Alegria_Lee15-Oct-10 3:06 
GeneralRe: How to put a rsa private key "hiden" in the code, and encrypt something with RSA! Sending the public key to decrypt. Pin
Ongcos17-Oct-10 22:51
Ongcos17-Oct-10 22:51 
GeneralRe: How to put a rsa private key "hiden" in the code, and encrypt something with RSA! Sending the public key to decrypt. Pin
Alegria_Lee18-Oct-10 4:34
Alegria_Lee18-Oct-10 4:34 
GeneralRe: How to put a rsa private key "hiden" in the code, and encrypt something with RSA! Sending the public key to decrypt. Pin
Ongcos7-Nov-10 22:23
Ongcos7-Nov-10 22:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.