Click here to Skip to main content
15,916,030 members
Home / Discussions / C#
   

C#

 
QuestionCommunication program with the lan to devices (for example plc) Pin
mory_26015-Oct-10 2:47
mory_26015-Oct-10 2:47 
AnswerRe: Communication program with the lan to devices (for example plc) Pin
Sauro Viti15-Oct-10 2:59
professionalSauro Viti15-Oct-10 2:59 
Questiontextbox change event Pin
Erdinc2715-Oct-10 2:07
Erdinc2715-Oct-10 2:07 
AnswerRe: textbox change event Pin
Not Active15-Oct-10 2:15
mentorNot Active15-Oct-10 2:15 
GeneralRe: textbox change event Pin
Erdinc2715-Oct-10 2:28
Erdinc2715-Oct-10 2:28 
GeneralRe: textbox change event Pin
Not Active15-Oct-10 2:32
mentorNot Active15-Oct-10 2:32 
GeneralRe: textbox change event Pin
Erdinc2715-Oct-10 2:38
Erdinc2715-Oct-10 2:38 
QuestionMessage Removed Pin
14-Oct-10 23:18
Pawan Kiran14-Oct-10 23:18 
AnswerRe: How to Prompt a Message When Cell Value is changed and Leaves CurrentRow Without Saving? Pin
Henry Minute15-Oct-10 0:32
Henry Minute15-Oct-10 0:32 
Questionhow to draw a rectangle on the picture box Pin
ash_ng14-Oct-10 22:49
ash_ng14-Oct-10 22:49 
AnswerRe: how to draw a rectangle on the picture box Pin
Henry Minute14-Oct-10 23:19
Henry Minute14-Oct-10 23:19 
GeneralRe: how to draw a rectangle on the picture box Pin
ash_ng14-Oct-10 23:30
ash_ng14-Oct-10 23:30 
GeneralRe: how to draw a rectangle on the picture box Pin
Henry Minute14-Oct-10 23:44
Henry Minute14-Oct-10 23:44 
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 

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.