Microsoft KB Archive/104472

From BetaArchive Wiki
< Microsoft KB Archive
Revision as of 17:43, 20 July 2020 by X010 (talk | contribs) (Text replacement - ">" to ">")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Using FoxPro to Test Presence of Icon in a Program Group

ID: Q104472

2.50 2.50a WINDOWS kbinterop kbprg

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:

1. Using DDE, initiate a channel to Program Manager from FoxPro for

   Windows.

2. 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.

3. 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. Additional reference words: VFoxWin 3.00 FoxWin 2.50 2.50a KBCategory: kbinterop kbprg KBSubcategory: FxinteropDde

Keywords          : FxinteropDde 
Version           : 2.50 2.50a
Platform          : WINDOWS

Last Reviewed: April 30, 1996
© 1999 Microsoft Corporation. All rights reserved. Terms of Use.