Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Keypress problem
Message
From
26/03/2007 12:52:20
Reza Meamar
Homa Programming Group
Shiraz, Iran
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP1
Miscellaneous
Thread ID:
01208497
Message ID:
01208523
Views:
25
Thanks Naomi for your suggestion, i will test it.
But what about thisform.KeyPreview = .F. in GotFocus and thisform.KeyPreview = .T. in LostFocus of my combo?
is it good way?



>Form's KeyPress:
>
>case nKeyCode = 27
>if type('thisform.ActiveControl.name') = 'C' and lower(thisform.ActiveControl.name) = 'mycombo'
>  ** Processing of combo's ESC
>else
>  thisform.release()
>endif
>endcase
>
>>Have you any suggestion?
>>
>>>Yes, it's true. You put your previous question in rather confusing way. If KeyPreview=.t. then you firstly get form.keypress code and then control.keypress. If Keypreview=.f. then you get control code only.
>>>
>>>>if i set Keypreview=.T. ( i want this setting ),I will see 'This is second' and then 'This is first' .
>>>>and if i set Keypreview=.F. ,I will see ONLY 'This is first' .
>>>>am i right?
>>>>
>>>>in fact i want this for one combo box in my form. i want to have ESC code for Exit from combo and from my form separately. i want if i am in combo, when i press ESC, only my combo closed and if i am in another control, i can exit from my form.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform