KeyPress event behaviour

claudio

Member
Licensed User
Longtime User
Hi everybody!

I have a problem with KeyPress event.

I would like to manage the special keys cDownKey and cUpKey but the form react to it only when no one control have the focus.

If i give the focus to a control, the form can't receive the event and the SpecialKeys event is used by the system to navigate on controls. This is ok, but when the focus falls on a TextBox the navigation stops because that events are used to move the caret, so i need to tap on screen to change focus.

There are a way to change this behaviour? On Delphi i remember a property which gives the events to the back form if they are not recognized, there are something similar in b4p or .NET?

I attach a sample
:sign0085:

Many thanks
Claudio
 

Attachments

  • KeyPress.sbp
    1 KB · Views: 159

claudio

Member
Licensed User
Longtime User
If i give the focus to a control, the form can't receive the event and the SpecialKeys event

Solved!

fgControls library contain the fgGetAsyncKeyState object which intercept all keys sent to the form.

Thanks Filippo!

Claudio
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…