Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Move focus from toolbar textbox to active form control
Message
From
07/06/2005 22:02:37
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01021089
Message ID:
01021196
Views:
19
Borislav,

I like your technique of using MOUSE AT -1, 0 to SAFELY move focus from a toolbar control to the most recent form control with focus. I've played with this technique and found that using negative values for both row and column positions still works. Who would have guessed?! (How does one move their mouse to a negative form coordinate?)

Here's my final solution:
* Borislav technique for returning focus to active control
if type( "_SCREEN.ActiveForm.Name" ) == "C"
  lcActiveForm = _SCREEN.ActiveForm
  MOUSE AT -1,-1 PIXELS WINDOW (lcActiveForm)
endif
I think I'm going to skip the idea of clicking on the active control since that may involve some more complicated code without any benefit over just clicking the form itself. I think your suggested code might need to be modified to use objtoclient() vs. raw .Left and .Top values?

Thanks again for your help!

Blagodaria(*)!!!
Malcolm

(*) Relieved that I chose the correct word vs. an unintentional insult :)
Malcolm Greene
Brooks-Durham
mgreene@bdurham.com
Previous
Reply
Map
View

Click here to load this message in the networking platform