Click here to Skip to main content
15,884,099 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
hello guys ,
i have a problem i am using Key Down Event of the form and i can be fired only when the form Loaded but when i give the focus to an element of the form Like Text box can not fire this event again because focus can not be backed to the Form again and if i clicked by mouse any where in the form it do nothing and still the text box have the focus i want to when i click any where in the form the form focused once again and any other control must lost focus can any one help me in doing that ?
thanks in advanced
Posted
Comments
[no name] 20-Sep-12 17:02pm    
It doesn't make sense. Why do you want do that?
If I know your purpose maybe suggest you a better code!
Yasser El Shazly 20-Sep-12 17:17pm    
because i use bar code reader when i try to raed the code and during the text box or any other element focused the code typed in the text box and also the Key pressed is Fired and i did not want to type nothing in the text box .
Sergey Alexandrovich Kryukov 20-Sep-12 17:12pm    
I agree with Meysam Tolouee.
Besides, you should understand that the focus is a keyboard focus, rather a property of a control.
For a window (not "Form", Window), you can talk about activation. When you activate a window, the control which was to has the focus will get it again.
--SA
Yasser El Shazly 20-Sep-12 17:17pm    
because i use bar code reader when i try to raed the code and during the text box or any other element focused the code typed in the text box and also the Key pressed is Fired and i did not want to type nothing in the text box .
Sergey Alexandrovich Kryukov 20-Sep-12 17:34pm    
???
You are really hard to understand...
--SA

1 solution

It is the default behavour of the event and controls where it get fired, please override the events if you want any specific operation on event fired.. if still any query then please be specific again that what you done. what you want and what you are getting right now... thanks..
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900