KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q138757: HOWTO: Change the Icon in an Application

Article: Q138757
Product(s): Microsoft FoxPro
Version(s): 
Operating System(s): 
Keyword(s): kbenv kbvfp300 kbvfp500 kbvfp600
Last Modified: 19-AUG-1999

-------------------------------------------------------------------------------
The information in this article applies to:

- Microsoft Visual FoxPro for Windows, versions 3.0, 5.0, 6.0 
-------------------------------------------------------------------------------

SUMMARY
=======

In a distributed application that will be run under Windows 95, you may need to
change the icon so that the executable displays your own icon file instead of
the FoxPro Logo. You can accomplish this by using a reference to the _SCREEN
object. This will also change the title bar icon in a Windows 95 application.

MORE INFORMATION
================

The _SCREEN system memory variable specifies properties and methods for the main
Visual FoxPro window. The property that needs to be changed in this case is the
Icon property. To change the icon shown on the screen's title bar, use this
command:

     _SCREEN.ICON = HOME()+"SAMPLES\GRAPHICS\ICONS\FLAG\FLGDEN.ICO"

To show how this works, enter this command in the Command window with Visual
FoxPro running under Windows 95. There is a directory of icons shipped with
Visual FoxPro located in the following directory:

  Vfp\Samples\Graphics\Icons

For more information on the _SCREEN system memory variable, query in the online
Help using _SCREEN.


Additional query words: WINDOW MODIFY _SCREEN

======================================================================
Keywords          : kbenv kbvfp300 kbvfp500 kbvfp600 
Technology        : kbVFPsearch kbAudDeveloper kbVFP300 kbVFP500 kbVFP600
Issue type        : kbhowto

=============================================================================

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.

Copyright Microsoft Corporation 1986-2002.