The information in this article applies to:
- Microsoft Visual FoxPro for Windows, version 3.0
- Microsoft FoxPro for Windows, versions 2.5 and 2.5a
To test for the existence of a particular icon within a program group
in Program Manager, you can use dynamic data exchange (DDE) with
PROGMAN.EXE, as follows:
- Using DDE, initiate a channel to Program Manager from FoxPro for
Windows.
- Store the contents of the desired group to a memory variable by
supplying the description of the program group:
m.chan = DDEINITIATE("progman","progman")
m.grp = DDEREQUEST(m.chan,"main","CF_TEXT")
The m.grp memory variable will now contain a listing of all program
items and their properties.
- Use <expC1> $ <expC2> to determine if the desired program item
exists in the m.grp memory variable. The search is case sensitive;
therefore, use the UPPER() function on both sides of the expression
to ensure accurate results. This comparison will return true (.T.)
if the expression was found.
m.found = UPPER("write.exe") $ UPPER(m.grp)
The value stored in m.found will be the logical result of the search.
|