Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Determining the currently active window
Message
From
15/10/2001 12:32:09
 
 
To
13/10/2001 13:35:26
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00567748
Message ID:
00568591
Views:
15
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

>
Previous
Reply
Map
View

Click here to load this message in the networking platform