Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SetFocus Method for Control Not executing
Message
From
16/03/1998 14:35:09
 
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00084832
Message ID:
00084887
Views:
35
>Thank you for your input. It was a combination of NODefault and DODefault after the setfocus which solved the problem in my LostFocus Method.
>
>IF pnreturn # 0 && Password Verfication failed, users was another try
> This.SetFocus
> NoDefault
>ELSE && Password Verfied, move on to weekending date
> DoDefault()
>RETURN
>
>***************
>
>Thanx again.
>
>Fred Lauckner
><>
>
>BTW. I was using the LostFocus Method because my validation routine calls a custom form like messagebox (but with a Timeout). In the INIT of the custom messagebox, I issue a conditional setfocus command. This throughs an error because VFP doesn't allow SetFocus from When, Valid, RangeHigh or RangeLow event.

The reason is that e.g. Valid event is exactle the place which firing internally when you try to move a focus, i.e issuing Setfocus from Valid(When etc) you can invoke recurrent loop until your computer die, so VFP compiler readily stops you.
BTW, in a case of standard textbox you don't need in Dodefault().
Edward Pikman
Independent Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform