Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Top Level form isn't top level (Win 2000)
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00495789
Message ID:
00495896
Vues:
11
Marty,
The code should work. I copied it and ran it from VFP6 SP5 running on NT4 SP6 and it ran fine. Try changing the USER32.DLL reference to Win32API. Maybe it can't find User32.Dll for some reason.

>Yeah, I tried that, but it doesn't work. Here's what the code looked like:
>
>nhWnd = FindWindow( 0, _chrWindowName )
>?"nhWnd = " + ALLTRIM(STR(nhWnd))
>
>DECLARE INTEGER GetLastError;
>   IN WIN32API
>
>
>DECLARE SHORT SetForegroundWindow IN USER32.DLL INTEGER hWnd
>*  I assume you've got the hWnd you want stored in the variable nhWnd
>nResult = SetForegroundWindow(nhWnd)
>
>IF nResult # 0
>   *  the desired window and thread are now in the foreground
>   ?"Success"
>ELSE
>   *  the hWnd was not assigned to the foreground and the thread
>   *  remains at its default priority
>   ?"nResult = 0"
>   nError = GetLastError()
>   ?"Error code:  " + STR(nError)
>
>ENDIF
>
>I get:
>nhWnd = 7195
>nResult = 0
>Error code: 2
>
>I looked error code 2 up on MSDN and see that it means "file not found." Freaky. Is this an issue in VFP 6.0 vs. 2000 as well?
Larry Miller
MCSD
LWMiller3@verizon.net

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

Click here to load this message in the networking platform