How to Automate Calls to ADDICON.APP

Last reviewed: April 30, 1996
Article ID: Q114486
The information in this article applies to:
  • Microsoft FoxPro for Windows, versions 2.5, 2.5a, 2.5b, 2.6

If you are repeatedly calling ADDICON.APP (a FoxPro application that adds an icon to a FoxPro .EXE file), you may want to automate the calling process. Since ADDICON.APP has no PARAMETER statement, you cannot pass parameters to the application. Instead, you can stuff the keyboard buffer with the appropriate information and then call ADDICON.APP.

The following code demonstrates this process. The name of the .EXE file does not matter.

   *** Begin Code Here ***

   exe="C:\MYAPP\MYAPP.EXE"  && This is your EXE name and location
   icon="C:\MYAPP\MYICON.ICO"  && This is your ICON name and location
   KEYBOARD exe + CHR(13)
   KEYBOARD icon + CHR(13)
   DO ADDICON.APP

   *** End Code Here ***

NOTE: If either the .EXE file or the icon information is invalid, the OK button in ADDICON.APP will be disabled (dimmed).


Additional reference words: FoxWin 2.50 2.50a 2.50b 2.60 passing icon
KBCategory: kbprg
KBSubcategory: FxtoolGeneral


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

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