Results 1 to 2 of 2

Thread: [HowTo]Change the icon of a foreign exe?

  1. #1
    Join Date
    Jan 2011
    Posts
    128
    Thanks
    2

    Default [HowTo]Change the icon of a foreign exe?

    What I want to do,is:
    1)open a file dialog,select an icon.
    2)open a file dialog,select the exe
    3)push a button "change icon" and change the icon of that program.

    I read about changing icons,but all I find is how to chnage the icon of the current app..

    Thank you.

  2. #2
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: [HowTo]Change the icon of a foreign exe?

    This should really be in general programming as it's nothing to do with Qt.

    But this is basically what you need to do:

    1) Download the PE specification: http://msdn.microsoft.com/en-us/wind...dware/gg463119

    2) Open your EXE file & Load the PE directory.

    3) Open the "Resources" directory

    4) In there you'll see the "Icon" entry. Replace this with what you want.

    5) Save the EXE.

    Note that you can't just change bytes as the replacement icon might not be the same size as the current one.

Similar Threads

  1. Can't change toolbutton icon
    By waynew in forum Newbie
    Replies: 4
    Last Post: 8th December 2010, 08:37
  2. Change button Icon on toggle
    By bizmopeen in forum Qt Programming
    Replies: 3
    Last Post: 13th July 2009, 23:17
  3. Change Application Icon
    By cutie.monkey in forum Qt Programming
    Replies: 1
    Last Post: 6th August 2008, 07:14
  4. Icon Change in Drag & Drop
    By joseph in forum Qt Programming
    Replies: 1
    Last Post: 9th December 2006, 12:03
  5. Qlabel with (icon and text) HowTo ?
    By QiT in forum Qt Programming
    Replies: 2
    Last Post: 8th August 2006, 08:14

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.