Help with embedding an icon into my executable...

Looks like it has something to do with building a resource file, but I can't find any definitive document on how to do it, besides the ugly help files on system.resource.


Can anyone help me with adding one icon to a resource file, then showing me how to pull the icon out as an icon object?

Thanks.

Comments

  • : Looks like it has something to do with building a resource file, but I can't find any definitive document on how to do it, besides the ugly help files on system.resource.
    :
    :
    : Can anyone help me with adding one icon to a resource file, then showing me how to pull the icon out as an icon object?
    :
    : Thanks.
    :

    Do you just want to change the icon for your program? Or do you want to use the icon for some other reason?

    If you just want to change the icon, then go to the Solution Explorer Window and right click on the project name (has a little VB icon next to it), then select properties.

    Then on left side you will see a menu.

    Common Properties
    General
    Build
    Imports
    etc etc

    Click build and then on the right you will see the application icon. Just hit the browse button (...) and then choose the icon you want to use.

    Hope that helps
    -Fallen

  • No, Im trying to programmatically add some menuitems to a context menu, with a subclassed menuitem class that carries icons. I can include them from a standard windows directory as .ico files, but id rather dump them into a .resource file or whatever and grab them that way.

    Does this make sense? I don't know if Im explaining it correctly.

    : : Looks like it has something to do with building a resource file, but I can't find any definitive document on how to do it, besides the ugly help files on system.resource.
    : :
    : :
    : : Can anyone help me with adding one icon to a resource file, then showing me how to pull the icon out as an icon object?
    : :
    : : Thanks.
    : :
    :
    : Do you just want to change the icon for your program? Or do you want to use the icon for some other reason?
    :
    : If you just want to change the icon, then go to the Solution Explorer Window and right click on the project name (has a little VB icon next to it), then select properties.
    :
    : Then on left side you will see a menu.
    :
    : Common Properties
    : General
    : Build
    : Imports
    : etc etc
    :
    : Click build and then on the right you will see the application icon. Just hit the browse button (...) and then choose the icon you want to use.
    :
    : Hope that helps
    : -Fallen
    :
    :

  • You need to do a build and then through the solution explorer open the bin folder - it may be hidden so turn of hiding - then open up the exe that was built inthe code window. Then right click the icon folder, select add resource, then import icon. Find your ico file and embed it, you will then need to set the resource ID's to something that makes sense. The only problem with this is everytime you do a build it destroys these entries. I haven't found a way to make them permanent, if you do let me know.


    : No, Im trying to programmatically add some menuitems to a context menu, with a subclassed menuitem class that carries icons. I can include them from a standard windows directory as .ico files, but id rather dump them into a .resource file or whatever and grab them that way.
    :
    : Does this make sense? I don't know if Im explaining it correctly.
    :
    : : : Looks like it has something to do with building a resource file, but I can't find any definitive document on how to do it, besides the ugly help files on system.resource.
    : : :
    : : :
    : : : Can anyone help me with adding one icon to a resource file, then showing me how to pull the icon out as an icon object?
    : : :
    : : : Thanks.
    : : :
    : :
    : : Do you just want to change the icon for your program? Or do you want to use the icon for some other reason?
    : :
    : : If you just want to change the icon, then go to the Solution Explorer Window and right click on the project name (has a little VB icon next to it), then select properties.
    : :
    : : Then on left side you will see a menu.
    : :
    : : Common Properties
    : : General
    : : Build
    : : Imports
    : : etc etc
    : :
    : : Click build and then on the right you will see the application icon. Just hit the browse button (...) and then choose the icon you want to use.
    : :
    : : Hope that helps
    : : -Fallen
    : :
    : :
    :
    :

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories