Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Manipulating Windows
Message
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01066784
Message ID:
01066787
Views:
15
>Hello Everyone,
>
>If multiple forms are displayed at the same time, is it possible to programatically give a particular form the focus?
>
>What I'd like to see is the form that loses the focus has its title bar deselected and the form that receives the focus have its title bar selected.
>
>Cheers and thank you.
>
> Andy


This swhitch between first 2 opened forms. You can extend this if you want to switch between many opened forms.
(no error checking here and not tested)
LOCAL lcWndName
IF _SCREEN.FormsCount > 1 && If we have at least 2 forms opened
   IF _screen.ActiveForm.Name == _screen.Forms(1).Name && If first is active
      lcWndName = [ACTIVATE WINDOW ]+_screen.Forms(2).Name
   ELSE
      lcWndName = [ACTIVATE WINDOW ]+_screen.Forms(1).Name
   ENDIF
   &lcWndName
ENDIF
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform