Results 1 to 17 of 17

Thread: Changing Icon

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jun 2002
    Location
    Far.. far away! (Netherlands)
    Posts
    169

    Changing Icon

    Ok, i'm making a setup program creater and I want to change the icon of a compiled exe. Anyone knows how to do this? (if it's even possible)

    Thanks in advance,

    -Shell-

  2. #2
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Why would a setup program need to change the icon of a compiled exe?
    My evil laugh has a squeak in it.

    kristopherwilson.com

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jun 2002
    Location
    Far.. far away! (Netherlands)
    Posts
    169
    I made an engine (a separate exe) which is the actual setup program, i executes a text file. I want the user to be able to change this program's icon.

    -Shell-

  4. #4
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    A text file isn't a program. You could change the icon associated with a text file, if that's what you mean.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Jun 2002
    Location
    Far.. far away! (Netherlands)
    Posts
    169
    Nono! I have the engine (an exe), and it contains a text file.

    -Shell-

  6. #6
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    And you want the user to be able to change the icon of your "engine?" Or the text file? How does your engine contain a text file?

    It's a setup program, right? So does it create a text file? and you want to change the icon FOR that text file?

    I'm so confused.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Jun 2002
    Location
    Far.. far away! (Netherlands)
    Posts
    169
    lol, ok, I'll try to explain

    I have made a setup creater and a setup engine. The creater is used to generate a script file which the setup engine can run.
    So you can use the engine to execute a script file, the script file contains all needed info about how the setup should go.

    When the script file is made, i make a copy of the engine exe and put the text file into the exe. What I want to do is to change the icon of this exe.

    -Shell-

  8. #8
    Frenzied Member cyborg's Avatar
    Join Date
    May 2000
    Location
    Sweden
    Posts
    1,755
    i know one really hard, and stupid way

    extract the icon, and open it in a hex editor, copy all text into clipboard.

    open the exe in a hex editor, search for the copied text...

    open a new icon and copy all text from it...

    paste it into the exe instead of the previous text...


    that's the only way i know of...
    Check out the FAQ and do a search before you post.
    My tutorials: Anti-Alias Pixels, Accurate Game Loop, Resource File

  9. #9

    Thread Starter
    Addicted Member
    Join Date
    Jun 2002
    Location
    Far.. far away! (Netherlands)
    Posts
    169
    That was what I was thinking
    I hoped someone would have some code to do it
    Thanks though.

    -Shell-

  10. #10
    Frenzied Member cyborg's Avatar
    Join Date
    May 2000
    Location
    Sweden
    Posts
    1,755
    that could be done using code.....but i think there is a better way...
    Check out the FAQ and do a search before you post.
    My tutorials: Anti-Alias Pixels, Accurate Game Loop, Resource File

  11. #11

    Thread Starter
    Addicted Member
    Join Date
    Jun 2002
    Location
    Far.. far away! (Netherlands)
    Posts
    169
    How?! Tell me!? please!

    -Shell-

  12. #12
    Frenzied Member cyborg's Avatar
    Join Date
    May 2000
    Location
    Sweden
    Posts
    1,755
    well... i dont know a better way, but i hope there is
    Check out the FAQ and do a search before you post.
    My tutorials: Anti-Alias Pixels, Accurate Game Loop, Resource File

  13. #13

    Thread Starter
    Addicted Member
    Join Date
    Jun 2002
    Location
    Far.. far away! (Netherlands)
    Posts
    169
    lol, i hope someone tells me that way

    -Shell-

  14. #14
    Frenzied Member cyborg's Avatar
    Join Date
    May 2000
    Location
    Sweden
    Posts
    1,755
    maybe you could do like this:
    VB Code:
    1. Open PrevIcon For Binary As #1
    2. 'get the text from it
    3. Close #1
    4.  
    5. Open NewIcon For Binary As #1
    6. 'get the text from it
    7. Close #1
    8.  
    9.  
    10. Open Exe For Binary As #1
    11. 'do search for  PrevIcons text and paste text from NewIcon...
    12. 'save
    13. Close #1
    Check out the FAQ and do a search before you post.
    My tutorials: Anti-Alias Pixels, Accurate Game Loop, Resource File

  15. #15

    Thread Starter
    Addicted Member
    Join Date
    Jun 2002
    Location
    Far.. far away! (Netherlands)
    Posts
    169
    Yea, but then the source icon must be the same size as the current one. ack! this is hard

    -Shell-

  16. #16
    Frenzied Member cyborg's Avatar
    Join Date
    May 2000
    Location
    Sweden
    Posts
    1,755
    yep...hehe...
    Check out the FAQ and do a search before you post.
    My tutorials: Anti-Alias Pixels, Accurate Game Loop, Resource File

  17. #17

    Thread Starter
    Addicted Member
    Join Date
    Jun 2002
    Location
    Far.. far away! (Netherlands)
    Posts
    169
    I've done some searching and I found a program called recource hacker, with it I can change the icon of a program, now all I need to know is how to do it with code

    -Shell-

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width