Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to make IE the active window?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
01134211
Message ID:
01134428
Vues:
18
Where do I actually implement your below code? I have modified my code which is in the form's init and looks like this. Without the "wait" statment, the instance of IE starts but VFP still is ontop, with the wait statment, IE comes to the forefront.


DECLARE INTEGER ShellExecute IN shell32.dll ;
INTEGER hndWin, ;
STRING cAction, ;
STRING cFileName, ;
STRING cParams, ;
STRING cDir, ;
INTEGER nShowWin


lcPdfFileName = "https://lmca-server/lmca/bstock.aspx"
ShellExecute(0, "Open", lcPdfFileName, "", "", 1)

wait


>Timothy,
>
>After Borislav's correction give this a try:
>
>
>#define SWP_NOSIZE          0x0001
>#define SWP_NOMOVE          0x0002
>#define SWP_NOZORDER        0x0004
>
>#define HWND_TOP        0
>#define HWND_BOTTOM     1
>#define HWND_TOPMOST    -1
>#define HWND_NOTOPMOST  -2
>
>declare integer SetWindowPos IN win32api ;
>  integer hWnd,            ; && handle to window
>  integer hWndInsertAfter, ; && placement-order handle
>  integer X,               ; && horizontal position
>  integer Y,               ; && vertical position
>  integer cx,              ; && width
>  integer cy,              ; && height
>  integer uFlags             && window-positioning flags
>
>declare integer GetTopWindow in win32api integer hwnd
>
>SetWindowPos( _vfp.hWnd, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOSIZE + SWP_NOMOVE ) && push _vfp to the bottom
>lnNewTop = GetTopWindow( 0 ) && find the window now on top
>SetWindowPos( _vfp.hWnd, HWND_TOP, 0, 0, 0, 0, SWP_NOSIZE + SWP_NOMOVE + SWP_NOZORDER ) && pull off the bottom but don't change zorder
>SetWindowPos( lnNewTop, HWND_TOP, 0, 0, 0, 0, SWP_NOSIZE + SWP_NOMOVE ) && push the oher window ontop of _vfp
>
>
>>David, I'm unsure about the oie reference syntax as I do not dabble much in this aspect. How will this work with the code I have or will I need to change somewhere?
"Build a man a fire, and he's warm for a day.
Set a man on fire, and he's warm for the rest of his life."
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform