Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
KeyPreview and Valid, can anybody help me in this.
Message
From
27/03/1999 11:52:44
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
27/03/1999 10:56:12
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00202720
Message ID:
00202730
Views:
13
>Hi agian to all UTites...
>
>I am making Keypreview to .T., in my Form and capturing the keys pressed by users in any controls.
>
>But the problem is, when a key pressed, say CTRL+S for saving the record. The Form's Keypreview event is run and the VALID event of the control is Ignored.
>
>Can somebody give me solution as to how I can make my Valid Event to trigger before the Keypress Event of the Form.
>
>TIA
You cannot. But you might develop a workaround :
if nKeyCode = something
 if ...activecontrol.valid
    * do something
 else
   nodefault
 endif
Better move your validation code to lostfocus.
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
Previous
Reply
Map
View

Click here to load this message in the networking platform