CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 1999
    Location
    US, Florida
    Posts
    817

    Adding an icon to project with "sub Main" only, no Forms.

    How to add an icon to replace EXE's icon when compiled if I don't use any forms in my project, only SUB Main?


  2. #2
    Join Date
    Dec 1999
    Location
    Dublin, Ireland
    Posts
    1,173

    Re: Adding an icon to project with "sub Main" only, no Forms.

    You need to use the resource editor application that comes with visual studio and add the icon to a .RES file, then compile it using the RC application.
    The icon with the lowest ID is used by the API GetAssociatedIcon so I'd imagine it is also used by Explorer.

    HTH,
    D.

    -------------------------------------------------
    Ex. Datis: Duncan Jones
    Merrion Computing Ltd
    http://www.merrioncomputing.com
    '--8<-----------------------------------------
    NEW -The printer usage monitoring application
    '--8<------------------------------------------

  3. #3
    Join Date
    Feb 2001
    Location
    Stamford CT USA
    Posts
    2,167

    Re: Adding an icon to project with "sub Main" only, no Forms.

    The easiest way is to add a dummy form and set the icon there. I know that you said no form but why not since it does not take too much space and you do not have to display it.

    -Cool Bizs

    Good Luck,
    -Cool Bizs

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

Featured