Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is there a better kludge for SetForegroundWindow?
Message
De
22/06/2002 12:01:43
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00671245
Message ID:
00671371
Vues:
16
Check this
set library to (home()+'foxtools.fll')  && for use of MainHwnd()
myhwnd = MainHwnd()                     && obtain HWND for VFP main window
run /n explorer.exe /e,/select,c:\      && launch Explorer against c:\

* pause long enough for the Explorer window to open
DECLARE Sleep IN kernel32 INTEGER dwMilliseconds
sleep(500)

_Screen.AlwaysOnTop = .t.
_Screen.AlwaysOnTop = .f.
_screen.Draw
DECLARE INTEGER SetForegroundWindow IN user32 INTEGER hwnd
? SetForegroundWindow(m.myhwnd)         && try to bring VFP back to foreground
HTH
Zlatin Zlatev,
MCSD (VS6)

Make solutions, not programs!

Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform