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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

icon in .esl file

Status
Not open for further replies.

Newtonm

Programmer
Nov 8, 2001
39
CA
ISTR a method by which you can permanantly change the icon that appears in the top left of the window of a compiled FPW26 application. I know it involved temporarily changing the .esl to a .exe file but after that I'm totally lost. Anyone know how to do this??
 
You can use ADDICON.APP to change the icon of an EXE. But as far as I know, it will only change it for the .exe you use it on. Any other .exe's will have to have it run on them also, including ones you recompile.

Dave S.
 
Hello!

A couple of years ago, I purchased the shareware below ("IconMove") that allows you to see the icons inside the .ESL and change them with your own.

Don't know if they are still in this address:

Integrated Graphics
312 Nevada St.
Northfield, MN 55057-2345

E-mail: hansonr@stolaf.edu

Icon Mover, ICONMOVR.EXE, enables a user to transfer standard Windows icon and icon-related device-independent bitmaps (16x16 or 32x32) from one application or group of applications to another. Transfer of icon bitmaps between any two ICO, BMP, DLL, EXE, FRX, VBX, etc... files is
supported.

Kenneth Tamayo
San Juan, Puerto Rico
 
Newtonm,

You can use the following. Copy and paste this into a .PRG, and then change the ICON and PATH names as appropriate to your application and ICON file.

* * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* FIXICON.PRG: Replace Icon in Fox 2.x ESL
* Author: Scott Payton
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * *

CLEAR
CLOSE ALL
*
PRIVATE M.LC_ESLIcon
PRIVATE M.LC_FoxIcon
PRIVATE M.LC_NewIcon
*
M.LC_NEWIcon = ""
M.LC_FoxIcon = ""
M.LC_ESLIcon = Read_Icon( "\ICONS\MYICON.ICO", 126, @m.LC_NEWIcon )
*
=Updt_Icon("\MYAPP\FOXW2600.ESL", 175720, m.LC_NewIcon)
*
CLOSE ALL

* * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * *

FUNCTION Updt_Icon

PARAMETER PC_Name, PN_Offset, PC_Buffer
*
PRIVATE M.LN_Handle
*
M.LN_Handle = FOPEN( m.PC_Name, 2 ) && Read/Write Buffered.
*
IF M.LN_Handle < 0 && If open not successfull...
?? CHR( 7 )
WAIT WINDOW m.PC_Name + &quot; Open error: &quot; + STR(FERROR())
RETURN .F.
ENDIF
*
=FSEEK(M.LN_Handle, M.PN_Offset)
*
=FWRITE(M.LN_Handle, M.PC_Buffer, 512)
*
=FCLOSE(M.LN_Handle)

* * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * *

FUNCTION Read_Icon

PARAMETER M.PC_Name, M.PN_Offset, M.PC_Buffer
*
PRIVATE M.LN_Handle
*
M.LN_Handle = FOPEN(M.PC_Name)

IF M.LN_Handle < 0 && If open not successfull...
?? CHR( 7 )
WAIT WINDOW m.PC_Name + &quot; Open error: &quot; + STR(FERROR())
RETURN .F.
ENDIF
=FSEEK(M.LN_Handle, M.PN_Offset)
*
M.PC_Buffer = FREAD(M.LN_Handle, 512)
*
=FCLOSE(M.LN_Handle)


If everyone likes this, I'll put it in a FAQ...
Best Regards,
Scott

Please let me know if this has helped [hammer]
 
Hi Scott
Absolutely BRILLIANT !! Many thanks. You deserve a [medal]

Regards
Richard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top