Guidance
指路人
g.yi.org
Guidance Forums / Rapid-Q Basic / How to assign Icon file to executable?

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. How to assign Icon file to executable?
#5067
Posted by: Nova_Shard 2004-09-11 01:20:00
Hey gang,

   I already know how to assign a little corner icon for the various windows of my program, but what I can't figure out is how to assign an icon file to the main executable itself.  You know, so when you click on the executable to launch it, you click on a cool, little picture instead of the default "application" image of a blue and white box.

   When I use:
$RESOURCE My_ICO AS "My_icon.ico"
Application.ICOHandle = My_ICO

   All I get is an assignment for the internal windows of the program.  Anyone know what command sets the icon for the exterior appearance of the exectuable itself?
Message2. Re: How to assign Icon file to executable?
#5072
Posted by: JonA 2004-09-14 11:16:01
Here is how I do it:

$INCLUDE "icon_filename.ico"

And then, click on the icon, right by the 'Code It!' button.  A box will open, where you can choose the icon that you want--but it must be the same as the icon in the $INCLUDE section.  The icon will then change to the one that you chose, and the next time you run the program, the old .EXE will be replaced by the new one with the icon you selected.

Remember, the icon can't be larger than 766 bytes (4 bit 16 color...or something like that)

You can get rid of the other code that you have regarding the icon.  If you use this code, the icon will be applied to the .EXE, to the left on the title bar, and at the bottom on the taskbar.

Jon
Message3. Re: How to assign Icon file to executable?
#5078
Posted by: Nova_Shard 2004-09-15 01:18:27
Thank you *very* much, Jon.  It works like a charm.  And that was the last little detail that was holding my programs back from having that polished, professional look.
Message4. Re: How to assign Icon file to executable?
#5083
Posted by: JonA 2004-09-15 14:18:36
Glad to help :)
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Fri 2024-3-29  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0