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!

Assigning an Icon to a Freewrapped executable

Status
Not open for further replies.

joe90

Technical User
Dec 18, 2000
10
US
Hi,
When I wrap a Tcl/Tk application (using Freewrap) the .EXE file that is produced has the Tcl\Tk icon associated with it. Is there any way I can persuade it to use a different icon instead.
PS. OS is MS Windows

TIA
Mark
 
Info at:
Excerp:
8) Using the WINICO features under Windows
Unfortunately the winico createfrom command cannot directly load an icon that is contained within a wrapped application. The icon file must first be written back to disk before it is loaded. The following example code demonstrates how this can be done.
# Ensure root window (.) is visible before running following code
set icofile /myproject/smiley.ico
if {[file exists $icofile]} {
set tmpfile c:/windows/temp/$icofile
set fin [open $icofile r]
fconfigure $fin -translation binary
set fout [open $tmpfile w]
fconfigure $fout -translation binary
puts -nonewline $fout [read $fin]
close $fin
close $fout
set ico [winico create $tmpfile]
winico setwindow . $ico
puts "you should see a yellow smiley in ."
}
You can read some excerpted Winico documentation for more information.

ulis
 
I had looked at this section in the Freewrap documentation and I think this refers to iconising (iconifying) a TCL
executable under unix - or at least controlling what is displayed when the application is minimised. After all, it requires the execution of some code. What I want is to change the icon that the user sees (and then clicks on) when they open the program folder holding the application. Sorry if this wasn't clear in the first place,
 
This section is titled: Using the WINICO features under Windows.
It applies only under Windows and its goal is to change the icon of the program file. The icon showed on the Startup bar and showed by the Explorer.
I think it is what you ask for.

ulis
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top