Results 1 to 19 of 19

Thread: Icons 16x16 and 32x32 [RESOLVED]

  1. #1

    Thread Starter
    Junior Member Morgoth's Avatar
    Join Date
    Mar 2005
    Posts
    20

    Resolved Icons 16x16 and 32x32 [RESOLVED]

    A fresh new form in Visual Basic 6.0 gives me a problem with icons. This has nothing to do with my program or code.

    I have 2 icons:
    16x16 small
    32x32 normal

    I also have 1 icon which contains both the small and normal icon (which I attached):


    When I add this combined icon into my form, I expect the in the top right corner of my form I will see the 16x16 icon, but instead I see a scaled down version of my 32x32 icon. Maybe there is a setting that I need to check, or an API I need to call?


    Why does VB scale down my 32x32 icon instead of using the 16x16 icon when it should? Is this a Visual Basic issue?

    Thanks for the help.
    Attached Files Attached Files
    Last edited by Morgoth; Mar 30th, 2005 at 03:47 AM.

  2. #2
    INXSIVE Bruce Fox's Avatar
    Join Date
    Sep 2001
    Location
    Melbourne, Australia
    Posts
    7,428

    Re: Icons 16x16 and 32x32

    G'Day Morgoth and Welcome to the VBForum.

    From memory 16x16 is the max Icon size for the Form.

    If you want to use larger sizes then you need to scale them acordingly.




    Bruce.

  3. #3
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: Icons 16x16 and 32x32

    Yes VB has an issue with icons. Read this article that explains how to fix that.

  4. #4
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: Icons 16x16 and 32x32

    Quote Originally Posted by Bruce Fox
    From memory 16x16 is the max Icon size for the Form.

    If you want to use larger sizes then you need to scale them acordingly.
    The problem is that VB scales down the 32x32 pixel icon instead of using his 16x16 pixel icon.

  5. #5
    Fanatic Member
    Join Date
    Mar 2002
    Location
    AUSTRALIA
    Posts
    603

    Re: Icons 16x16 and 32x32

    Somewhere on the web, in the last week, I actually came across someone mentioning that there was a bug in VB, and it does exactly what you noticed (scales down the 32x32).
    He also provided a solution/work around.
    I didn't download it.
    And my memory ain't good enough.

    At least knowing there is a bug, should assist you a bit ?
    Rob C

  6. #6
    INXSIVE Bruce Fox's Avatar
    Join Date
    Sep 2001
    Location
    Melbourne, Australia
    Posts
    7,428

    Re: Icons 16x16 and 32x32

    Quote Originally Posted by RobCrombie
    Somewhere on the web, in the last week, I actually came across someone mentioning that their was a bug in VB, and it does exactly what you noticed (scales down the 32x32).
    He also provided a solution/work around.
    I didn't download it.
    And my memory ain't good enough.

    At least knowing there is a bug, should assist you a bit ?
    Hey Rob,

    Joacim posted a decent workaround.




    Bruce.

  7. #7
    Fanatic Member
    Join Date
    Mar 2002
    Location
    AUSTRALIA
    Posts
    603

    Re: Icons 16x16 and 32x32

    Hey Rob,

    Joacim posted a decent workaround.
    He was faster than me, so I didn't realise he had posted, whilst I was typing.
    So there is more than just my memory failing.
    Rob C

  8. #8
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,810

    Re: Icons 16x16 and 32x32

    Excellent link!! This deserves a positive rating... but I won't be able to do it now.
    Emiliano F. Martín


    If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
    Encourage the person who helped you to keep doing it, and give him the points he deserves.


    MP3 Organizer: Freeware to logically organize all your MP3s.

  9. #9
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: Icons 16x16 and 32x32

    Quote Originally Posted by Mc Brain
    Excellent link!! This deserves a positive rating... but I won't be able to do it now.
    No? Why not?

  10. #10
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,810

    Re: Icons 16x16 and 32x32

    Quote Originally Posted by Joacim Andersson
    No? Why not?
    Elementary, my dear Watson!!

    You must spread some Reputation around before giving it to Joacim Andersson again.
    Emiliano F. Martín


    If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
    Encourage the person who helped you to keep doing it, and give him the points he deserves.


    MP3 Organizer: Freeware to logically organize all your MP3s.

  11. #11
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: Icons 16x16 and 32x32

    Quote Originally Posted by Mc Brain
    Elementary, my dear Watson!!
    Ohh... I see, LOL.

  12. #12

    Thread Starter
    Junior Member Morgoth's Avatar
    Join Date
    Mar 2005
    Posts
    20

    Re: Icons 16x16 and 32x32

    Wow, thank you guys so much for the quick responses.

    I have previously looked over this article in my google searches. I have never used resource files before (atleast not that I have ever known about) I am mostly an ASP programer.

    The code I received from this article allowed my 3-in-1 icon to work properly on the outside, but I need to get my .rc file compiled with my exe, right?
    Can I get a little clarification on how to get this working, please?


    Thanks again for the help!!

  13. #13
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: Icons 16x16 and 32x32

    If you use the approach mentioned in the article you've created a text file (probably named Something.rc). You need to compile that into a resource file which you add to your project. You have a resource compiler called RC.EXE in the Wizards subfolder of where you have VB installed. To compile the file open a command prompt and change the active directory to where your *.rc text file is stored. Then type something like this:
    Code:
    "C:\Program Files\Microsoft Visual Studio\VB98\Wizards\RC.EXE" /r /fo TheFileName.res TheFileName.rc
    Change the path (if necassary) and the file names.

    Then in VB click Project > Add File and select your *.res file.

    Another, simplier, approach would be to use the Resource Editor to create the resource file, since it will compile and add it to your project automatically.

    The resource editor is a VB add-in so if you don't have it available for you on the Tools menu then click Add-Ins > Add-In Manager and select VB6 Resource Editor in the list and check "Loaded/Unloaded" and the "Load at startup" checkboxes. Click OK and you can now start the editor from the Tools menu.

  14. #14

    Thread Starter
    Junior Member Morgoth's Avatar
    Join Date
    Mar 2005
    Posts
    20

    Re: Icons 16x16 and 32x32

    Joacim Andersson, you seriously are a Guru, but I solved this exactly how you explain it before I reloaded the forum.

    I asked my brother this question, and he told me that I create the .res file from the .rc file with the rc.exe.

    When he said that, I quickly understood, opened cmd.exe and copied over my .ico and .rc into the Wizards folder
    C:\Program Files\Microsoft Visual Studio\VB98\Wizards>rc /r /fo Test.res re.rc
    Made my res file, and loaded it into my project.
    Worked perfect!

    Thank you Joacim Andersson, and everyone else!

  15. #15
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: Icons 16x16 and 32x32

    Glad I could help. Since you're new to this forum I would like to mention that it's a custom around here when your question has been answered to edit your origional post and add the word [RESOLVED] to the title and to use the green checkmark () as the post icon.

  16. #16

    Thread Starter
    Junior Member Morgoth's Avatar
    Join Date
    Mar 2005
    Posts
    20

    Re: Icons 16x16 and 32x32 [RESOLVED]

    Changed.

    Thanks again!

  17. #17
    Lively Member
    Join Date
    Sep 2017
    Posts
    79

    Re: Icons 16x16 and 32x32 [RESOLVED]

    Thank You Joacim Andersson,

    Your Post at #13 helped me a lot. Though i gone through the link at #3 earlier, could not understood completely.
    Again i am having a question that how much DPI the .ico can be made, that will supported by VB6.

  18. #18
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    38,943

    Re: Icons 16x16 and 32x32 [RESOLVED]

    This thread is 12 years old. I'm not sure that the people involved are still paying attention to this. Far better would be to start a new thread on the subject.
    My usual boring signature: Nothing

  19. #19
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    9,817

    Re: Icons 16x16 and 32x32 [RESOLVED]

    But Shaggy, it's October, halloween days. Time to wake up the dead.
    Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.

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