Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FindWindow and SetForegroundWindow in W98
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
FindWindow and SetForegroundWindow in W98
Divers
Thread ID:
00255586
Message ID:
00255586
Vues:
66
I am trying to use a combination of FindWindow() and SetForeground Window().
DECLARE INTEGER FindWindow IN WIN32API ;
        STRING  windowtype, ;
        STRING  caption

DECLARE INTEGER SetForegroundWindow IN WIN32API ;
        INTEGER hwnd

x = FindWindow(0,ALLTRIM(goMyForm.Caption))
IF x#0
   z=SetForegroundWindow(x)
ELSE
   messagebox("Not found/")
ENDIF
Under Windows95 this works, but under Windows98 and nt4sp4, the first time I use this code, it does not bring the window forward.

Note: The ELSE is not executing, so I assume that FindWindow is getting a valid value.

1. Am I calling this wrong?
2. Is there a new version of the function in 98 and nt
3. any suggestions.

TIA,
Rick
Rick Hodder
MCP Visual Foxpro
C#, VB.NET Developer
Independent Consultant
www.RickHodder.com
MyBlog
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform