Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Date Stamp Hot Key
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00159687
Message ID:
00159779
Views:
23
>>
>>Kevin, use KeyPress event. Your have 2 choices : set form.KeyPreview = .t. and place the code to form.KeyPress, or have your date textbox subcassed and put this code in the textbox class KeyPress.
>>
>>Nick
>
>Thanks for the info!! I tried the first suggestion but for some reason it seems to ignore function keys ?!?!? I have other keys in the keypress event (Page UP and DOWN) that work. My nKeyCOde value for F12 is 134.

There was the thread recently with a message that F keys work if you run the form from the development environment, but not from .APP or .EXE

> Also do you know how I can determine if the current object is a date field? Do I still use TYPE?

You can analyse the Format property for the textbox if it is set to "D" format, or type of .ControlSource field, or just TYPE("textbox.Value")

>As for the second suggestion, unfortunately the app was created without a subclass library. All the date fields are off the base class. Is there some way to implement the second suggestion at this point??

Actually you can create a class library with this class, then replace the original textboxes with the new subclassed ones ( it involves also setting all the properties and copying the methods to their instances from the old ones if they were there) , or hack the form and change the parent class of those textboxes to point to the new class.

Nick
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Reply
Map
View

Click here to load this message in the networking platform