Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Prevent form keypress from ocurring on one control
Message
De
26/07/2004 16:07:57
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00928031
Message ID:
00928053
Vues:
24
Thanks ONCE AGAIN Sergey, :o)

I decided to check for the activecontrol in the form's keypress and take whatever action (or none) as required.

Tracy

>>I have a grid on a formclass and some other shapes and controls. The form initiates an action everytime the user presses a key based on the form's keypress event. I have a separate textbox I want to add to the form class though and it is the only control on the form that when the user enters a value, I do not want the form keypress to occur. Is there anyway to prevent the form's keypress event from ocurring on one control of the form only?
>>
>
>Hi Tracy,
>
>A couple of ideas:
>- Set forms KeyPreview = .F. in textbox GotFocus and back in LostFocus
>- In forms KeyPress check active control and do nothing if it's this particular textbox
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform