Hi Razvan!
>If you use KeyPreview=.T. whatever key you press and whereever you are in the form the code in ThisForm.KeyPress is executed.
>If you want to set a HotKey (a..z or 0..9) you must use NODEFAULT in KeyPress Event of the form.
>
>If you have other questions ...
>
>Razvan
Thank you for a good advice. It helps me to find a workaround of my problem.
By the way, i use KeyPreview=.T. and KeyPreview=.F. to switch the behaviour of the form. When I need some object (e.g. numeric input field) to recieve keystrokes, i use MyForm.KeyPreview=.F.
After this i found out that when i am entering in this field digits, functional keys etc., the only keypress event fired is that of the object. But when i press Enter, both object's and form keypress event occurs. Strange behavior of VFP!
That is why I should use NODEFAULT in keypress event of the form only for that keys, i need.
Thanks in advance
Alexander Mitchenko, Kiev, Ukraine
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only