Microsoft KB Archive/149589

= How to Ensure that Custom Icons Show Up in Windows 95 Explorer =

Article ID: 149589

Article Last Modified on 10/15/2003

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0b Standard Edition
 * Microsoft Visual FoxPro 6.0 Professional Edition

-



This article was previously published under Q149589



SUMMARY
This article describes the steps necessary to ensure Windows 95 Explorer displays the correct custom icon (not the Fox head icon) in Large Icon View or Small Icon View for a Visual FoxPro for Windows created .exe file.



Step-by-Step Procedure
Windows 95 can display large and small icons for the same file under different circumstances. To ensure that the custom custom icon is displayed in a Visual FoxPro version 3.0b executable, follow these steps:

 Set up ImagEdit to make a 16x16 icon. To the Imagedit.ini file in the Windows directory, add:

[ImagEdit.Icon] Win95=16,16,16

For more information about using ImagEdit to create a 16x16 icon, please see the following article in the Microsoft Knowledge Base:

136044 How to Make ImagEdit Create 16X16 Icons

 Create a 32x32 image icon in ImagEdit. Then create a 16x16 image as follows:

 Start Imagedit from the Visual FoxPro program group. On the ImagEdit File menu, choose New. In the Resource Type dialog box, choose Icon, and then click OK. In the New Icon dialog box, choose Target Device and EGA/VGA 16-color 32x32. Then click OK. Selecting Screen as the background color in the ImagEdit Color Palette makes the background transparent. Draw the 32x32 icon. Complete the 32x32 image. On the ImagEdit Edit menu, choose New Image. In the New Icon Image dialog box, choose Win95 16-Color 16x16 as the Target Device. Then click OK. Draw the 16x16 image and save the file with an .ico extension .  Add the icon file to the project as follows:

In Project Manager, click the Other tab. Choose Other Files and then choose Add. Under Files of Type, choose All Files, select the .ico file, and then click OK.</li> To add the icon to the .exe file, right-click Project Manager, and choose Project Info. On the Project tab, select the Attach Icon to check box. In the Open dialog box, choose the .ico file, and then click OK.</li> In the Main program of the application, set the icon by adding the following code:

_screen.icon=" .ICO"

</li> Build the .exe file.</li></ol>

NOTE: Windows 95 uses the 32x32 icon image for Large Icon view and the 16x16 icon image for Small Icon view. The first icon added to the file within ImagEdit becomes the icon in the upper left corner of the application window in Windows 95 and on the Windows 95 Taskbar. In this example, the 32x32 image is used in both places. If the 16x16 image is added to the .ico file first, the icon appears distorted in the Taskbar, especially if the background is transparent. When created as described, the icon is also displayed under Windows NT and Windows 3.1x.

The previous steps must be followed in the order given to avoid the error:

The file named is already in the project

Additional query words: VFoxWin imageedit

Keywords: KB149589

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.