Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
KeyPreview--no control.KeyPress
Message
De
10/04/2006 16:47:10
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
10/04/2006 15:33:51
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01112147
Message ID:
01112172
Vues:
16
This message has been marked as the solution to the initial question of the thread.
>I'm working on a form that has KeyPreview set to .T. and code in the form-level KeyPress. I'm finding that in some circumstances, the control's KeyPress doesn't fire after the form's KeyPress. In particular, it happens when I press Tab in a textbox on this form. The result in this case is that the next control in tab order is receiving the tab key, and focus is jumping two controls.
>
>Both the form and textbox are based on subclasses and I can't duplicate this with base classes, so I know it's something I'm doing.
>
>The code in the form class's KeyPress looks like this:
>
>
>IF This.TestSomething(nKeyCode)
>   This.DoSomething()
>ENDIF
>
>DODEFAULT(nKeyCode, nShiftAltCtrl)
>
>
>In my testing, This.TestSomething() is returning .F., as it should, so This.DoSomething() is never called.
>
>To see what's happening, I've used event tracking as well as DEBUGOUT in the form and control KeyPress events.
>
>Any ideas what could suppress the control KeyPress at this level?
>
>Tamar

Isn't that dodefault() causing the problem? It'd dodefault anyway.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform