Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change ICON of Executable

Status
Not open for further replies.

PTCruiserII

Programmer
Jan 29, 2002
61
CA
The EXE I generate from my program in VFP6 does not change the ICON that I see in windows explorer - it is still the FOX. I have placed the icon (.ICO) in the project OTHER FILES and placed the icon in the project INFO as ATTACHED ICON but I cannot get the ICON to appear for the EXE.

When I drag the EXE shortcut to the desktop, then I finally get the ICON to appear.

How can I get the ICON visible on the EXE?
 
Your problem is probably that your .ICO file only has a 32x32 image. You need a 16x16 image to view it as anything but a Large Icon (List, Detail, or Small Icon mode uses the 16x16 image).

Ian
 
PTCruiserII,
Are you using VFP 7??? I'm having the same problem, and have not yet found a solution.
Best Regards,
Scott

Please let me know if this has helped [hammer]
 
Did you attach the Icon in the Project Information to the code file? Do you have a line in the main program to attach this same icon to the main screen? (e.g. _Screen.Icon = "MyApps.ICO")

Some KB articles:
- How to Ensure that Custom Icons Show Up in Windows [95] Explorer.
- HOWTO: Create Custom Cursor and Icon Files
- INFO: General Information About the Image Editor

Rick
 
I created the icon with 32X32 so you say I need to have 16X16 versions in the same ICON file - will do...

Yes Rick, I have done the rest of the stuff but 16X16 and I always use explorer in details mode so that must be it.

Thanks guys - and have a nice day
 
Rick,
I've tried both 32x32 and 16x16. My MAIN window (Which is actually called "Main" is actually a window, and I have set the Icon property to the path and file name of the Icon. I'll try the _SCREEN suggestion, but I don't logically see how that will make a difference.
By the way, don't know if this matters, but I'm using WinXP Pro.

Best Regards,
Scott

Please let me know if this has helped [hammer]
 
Scott,
First, I'm using VFP 5/6/7 on XP Pro, so that's not a problem. The important point is not to have either a 16x16x16 OR 32x32x16 Icon, but to minimally have at least these two sizes in the SAME ICO file. More variants, with other sizes and/or color depths will be used by different OSs in various situations, but these TWO are required to not get a "fox" in any circumstance.

Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top