Results 1 to 6 of 6

Thread: How to:-Application with multiple icons.

  1. #1

    Thread Starter
    Lively Member satti charvak's Avatar
    Join Date
    Apr 2001
    Location
    noida, india
    Posts
    90

    Lightbulb How to:-Application with multiple icons.

    I want to create application in VB6.0 with multiple icons like e.g. Internet Explorer, but I've not been able to put more than 1 icon while creating an executable file.


    pls help.

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: How to:-Application with multiple icons.

    The only icon associated with Internet Explorer is the e on top of a piece of paper icon.

    Each .exe program will have just one icon associated with it (at a time), but I believe you can change that icon periodically if you want to.

    What is it precisely that you want to do with multiple icons?

  3. #3

    Thread Starter
    Lively Member satti charvak's Avatar
    Join Date
    Apr 2001
    Location
    noida, india
    Posts
    90

    Re: How to:-Application with multiple icons.

    but when we open internet explorer in icon extracting applications like microangelo, we can see a bunch of icons....i just wanted to add that functionality to my app.

    actually, i'm using command line argumet while calling my application, which would behave differently with different parameters.

    now if i can get different icons to different short cuts (to same application)then it would be amazing.

  4. #4
    Addicted Member
    Join Date
    May 2004
    Location
    Nagpur, India
    Posts
    228

    Re: How to:-Application with multiple icons.

    you will have to create resource file for that, also known as satellite dll i think.

    You can do following:
    1. Select a project type a Active DLL.
    2. From AddIn manager, add VB 6 resource Editor
    3. Use this resource editor to add icons, 1 by 1.
    4. Compile this DLL.

    This DLL can be used for icons.

  5. #5

    Thread Starter
    Lively Member satti charvak's Avatar
    Join Date
    Apr 2001
    Location
    noida, india
    Posts
    90

    Red face Re: How to:-Application with multiple icons.

    Can you please give me a small, full-example of the same. I've tried many things but i'm not familiar to resource editor.

  6. #6
    Addicted Member
    Join Date
    May 2004
    Location
    Nagpur, India
    Posts
    228

    Re: How to:-Application with multiple icons.

    Unfortunately, i cannot explain more about resource editor, than the one i have already mentioned.
    You will have to check MSDN, because it is more like "click here-click there" stuff.

    Assuming that you have entered your bitmap image using Resource Editor, you can use a simple VB function as follows:
    bytData = LoadResData(ID, "CUSTOM")

    Now, the ID here reflects the ID for the resource you entered.
    The bytData can be used further, because it is your raw bytes, representing the icon\image.
    So, use the bytData to write to a file, with say .ico as extension.
    Use:
    Open OutputFilePath For Binary Access Write As #fp
    Put #fp, , bytData
    Close #fp

    Now, your icon file is ready in OutPutFilePath

    Check the following for Resource Editor:
    http://www.thevbzone.com/l_res.htm

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