Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Determining the currently active window
Message
 
 
À
13/10/2001 13:35:26
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00567748
Message ID:
00568591
Vues:
16
I just put in a check for the empty string and it's working good.

Thanks,

Michelle

>Michelle,
>Not sure if this will help, but I found situations where the native WONTOP() function didn't work. E.g. it returns an empty string when you're in the command window, the view window or the document view. In situations like this I use the _WOnTop() function from FoxTools. You could try something like this:
>
>
>IF NOT "FOXTOOLS" $ SET("LIBRARY")
>	IF FILE("FOXTOOLS.FLL")
>		SET LIBRARY TO FOXTOOLS ADDITIVE
>	ELSE
>		MESSAGEBOX("Cannot find FoxTools.fll. Procedure canceled.", 16, PROGRAM(), 1000)
>		RETURN
>	ENDIF
>ENDIF
>
>lnWhandle = _WOnTop()
>
>IF lnWhandle = 0
>	MESSAGEBOX("_WFindTitl returned 0. Procedure canceled.", 16, PROGRAM())
>	RETURN
>ELSE
>	MESSAGEBOX("Currently Selected Window = '" + _WTitle(lnWhandle)+ "'")
>ENDIF
>
>ACTIVATE WINDOW SCREEN
>?"Hi"
>
>_WSelect(lnWhandle)
>
>RETURN

>
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform