Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Bring app to forefront
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
00964386
Message ID:
00964643
Vues:
10
Hi Jon and Rick

I found my mistake. I was passing the Hwnd of _VFP rather than of the _Screen to the SetForegroundWindow() api. It works correctly with _Screen.Hwnd.

Thanks


>>I have an app that starts another program using ShellExecute() api. The other app runs minimized and performs some work and my app waits for it to finish. When the other program finishes, however, my app is not the foremost window. It is visible but it is not the foremost window. I tried using SetForegroundWindow( _VFP.hWnd ) api but this just makes my app flash on the Windows taskbar but does not make my window the foremost active window. Any suggestions?
>
>Jos,
>
>I recall having a similar situation when I needed to force a new e-mail message window to be in the foreground. The solution I found was to first call the BringWindowToTop() API function, passing the handle of the window in question. Then, I called ShowWindow(), passing the handle and the state (1 for normal).
>
>Hope that helps.
>
>Laterness,
>Jon
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform