Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Wexist catches _screen's caption
Message
From
06/02/2005 04:38:33
 
 
To
03/02/2005 13:16:59
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00983563
Message ID:
00984282
Views:
24
This message has been marked as the solution to the initial question of the thread.
>Try this in the command window:
>
>
>_screen.Caption="Hello"
>? wexist("Hello")
>

>
>The wexist function recognizes VFP's main screen caption as an existing window.
>
>In my application, the user can personalize _screen's caption.
>When in code I try to check if some window of mine exists, the function returns .T., but my window doesn't exist.
>
>I have lots of wexists in my code.
>Anyone has a hint for a workaround ?
>
>Thanks.

Workaround:
CLEAR
SET EXACT OFF
SET COLLATE TO "MACHINE"
_SCREEN.Caption='Hello'
? WEXIST('hello'),LOWER(ALLTRIM(_SCREEN.Caption))=LOWER('hello')
_SCREEN.Caption=CHR(160)+'Hello'
? WEXIST('hello'),LOWER(ALLTRIM(_SCREEN.Caption))=LOWER('hello')
Attention, this defective VFP design is applied to the toolbars:
CLEAR

? WEXIST('Hellox')

Z=CREATEOBJECT("toolbar")
z.Caption='Hellox boy'

? WEXIST('Hellox')
Fabio
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform