Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Set Focus to a form
Message
 
 
À
13/07/2000 15:17:08
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00391496
Message ID:
00392058
Vues:
14
Rich,
You can use the WinAPI to activate your VFP window. Use Foxtools to get the handle of your VFP window and use SetForegroundWindow to activate it.
declare integer SetForegroundWindow in win32api integer
set library to foxtools.fll additive
lnwind = MainHWnd()   && Foxtools call
SetForegroundWindow(lnwind)
HTH.

>Hello,
>
>It all start with tring to find a way to create GLOBAL hot keys. Global being that even if the application is minimized and another app has focus the hot keys would work. I could not find anyway to do that in VFP, so I came with this idea.
>
>The "small box" is a Desktop form the is always on top with tiltle bar off. The main idea was you sweep your mouse over the "box" a data form is started (DO FORM) in the mouseover event, then press the hot key combo and it would perform some database functions. When the "box" has focus all works as I expected, however if some other application has focus and I swipe my mouse over the box the data form pops open but the hot keys do not work. I figured this out to be because the window although it pops up does get focus, therefore the hot keys do not function. If you click on the now open form the form gets focus and the hot keys work.
>
>I have tried setfocus to a field on the form, activate, show(), mouse click, read events, and countless other,even disable and enabling the form. I have run out of ideas.
>
>Any help yo could give would be great.
>
>Rich Imbruglio
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform