Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can't focus on my form
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00330607
Message ID:
00330802
Views:
10
>>If what Bruce has suggested doesn't work for you, try setting the focus to your control in the form's GotFocus, not the Init. Strange things happen if you try to SetFocus from the Init.
>
>Indeed, you've disturbed the natural event firing, though depending on what you're doing, it may not cause trouble...probably a good thing to avoid, in general, though. A setfocus in the Init causes the form Activate (and anything it runs) to run earlier than normal, then the Init finishes up...

That's pretty much what I discovered (the hard way, of course!). At least until I found out about LISAG, anyways. I usually don't have problems with a SetFocus in the Activate or the GotFocus, but it took quite awhile to track down a problem on some machines when a SetFocus was called by some code in an Init.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform