Results 1 to 28 of 28

Thread: [RESOLVED] Icons

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2008
    Posts
    1,260

    Resolved [RESOLVED] Icons

    I am having trouble setting an icon in my project for my form.

    What size does it have to be?

    Also, where on the net are there free icons that work in vb6? Most i have tried are invalid...

  2. #2
    Fanatic Member
    Join Date
    Oct 2009
    Location
    Missouri
    Posts
    770

    Re: Icons

    If you have C++, you can make your own icons. It has to be an Icon file. Not any picture will do.
    Rate my post if i helped you!


    Button Configuration Control For VB6 GetAsyncKeyState
    I'm the 7th best high school programmer in the nation!(according to SkillsUSA Nationals)(Used C#.Net)

  3. #3
    Addicted Member
    Join Date
    Aug 2009
    Posts
    227

    Re: Icons

    I'm not exactly sure what size it has to be, but it just needs to be a ".ico" file.

    Check out http://iconarchive.com if you haven't already.

  4. #4

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2008
    Posts
    1,260

    Re: Icons

    I keep getting an 'Invalid picture' error when i try any of the icons... even the ones off http://iconarchive.com

  5. #5
    Addicted Member
    Join Date
    Aug 2009
    Posts
    227

    Re: Icons

    Hmmm... what size icons are you using?

  6. #6
    Fanatic Member
    Join Date
    Oct 2009
    Location
    Missouri
    Posts
    770

    Re: Icons

    are u doing it in the picutre property?
    Rate my post if i helped you!


    Button Configuration Control For VB6 GetAsyncKeyState
    I'm the 7th best high school programmer in the nation!(according to SkillsUSA Nationals)(Used C#.Net)

  7. #7

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2008
    Posts
    1,260

    Re: Icons

    are u doing it in the picutre property?
    nope, in the icon property

    Im not sure what size, how do i find that out?

  8. #8
    Addicted Member
    Join Date
    Aug 2009
    Posts
    227

    Re: Icons

    Right click the icon file and click properties to find out the size.

  9. #9

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2008
    Posts
    1,260

    Re: Icons

    48 x 48, 16 x 16, 256 x 256... none work

  10. #10
    Addicted Member
    Join Date
    Aug 2009
    Posts
    227

    Re: Icons

    Could you try the icon I have attached? It has worked with me on a few programs in a series I made. Let me know how it goes.
    Attached Files Attached Files

  11. #11
    Fanatic Member
    Join Date
    Oct 2009
    Location
    Missouri
    Posts
    770

    Re: Icons

    So u are using this property on the form right?
    Last edited by Gamemaster1494; Mar 25th, 2010 at 08:31 PM.
    Rate my post if i helped you!


    Button Configuration Control For VB6 GetAsyncKeyState
    I'm the 7th best high school programmer in the nation!(according to SkillsUSA Nationals)(Used C#.Net)

  12. #12

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2008
    Posts
    1,260

    Re: Icons

    arcticfang: that works...

  13. #13
    Fanatic Member
    Join Date
    Oct 2009
    Location
    Missouri
    Posts
    770

    Re: Icons

    Simon Canning, what icon are u trying to use?
    Rate my post if i helped you!


    Button Configuration Control For VB6 GetAsyncKeyState
    I'm the 7th best high school programmer in the nation!(according to SkillsUSA Nationals)(Used C#.Net)

  14. #14

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2008
    Posts
    1,260

    Re: Icons

    Try this: http://www.canning.co.nz/Calander.ico

    Does it work?

  15. #15
    Fanatic Member
    Join Date
    Oct 2009
    Location
    Missouri
    Posts
    770

    Re: Icons

    can u upload it please?
    Rate my post if i helped you!


    Button Configuration Control For VB6 GetAsyncKeyState
    I'm the 7th best high school programmer in the nation!(according to SkillsUSA Nationals)(Used C#.Net)

  16. #16
    Fanatic Member
    Join Date
    Oct 2009
    Location
    Missouri
    Posts
    770

    Re: Icons

    well, i can get it to look like this..... but that is about all i can do. If you want it, just download the NewFolder.zip file i attached. Just upload the file into the project and it will work.
    Last edited by Gamemaster1494; Apr 30th, 2010 at 10:32 PM.
    Rate my post if i helped you!


    Button Configuration Control For VB6 GetAsyncKeyState
    I'm the 7th best high school programmer in the nation!(according to SkillsUSA Nationals)(Used C#.Net)

  17. #17

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2008
    Posts
    1,260

    Re: Icons

    I have heaps of png files that i want to convert to icons... what software do you recommend... i tried Imagicon 3.4 free download... but the resolution is so poor.

  18. #18
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Icons

    as VB6 is so old, it is very fussy about what icons it supports... for details see the article What picture types does VB support? (or: why wont VB load this picture/icon?) from our Classic VB FAQs (in the FAQ forum)

    In terms of software to convert (or create) icons, the best I have ever seen is IcoFX, which is completely free.

  19. #19
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: Icons

    If you want to use a nice alpha blended icon for your form, you can do that at runtime. This posting has sample code on how that can be done
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  20. #20
    Fanatic Member
    Join Date
    Oct 2009
    Location
    Missouri
    Posts
    770

    Re: Icons

    I used C++ to convert it to an icon file that VB could use. The only thing that i cant figure out why it changes the color of the icon i use. Its weird. O_o
    Rate my post if i helped you!


    Button Configuration Control For VB6 GetAsyncKeyState
    I'm the 7th best high school programmer in the nation!(according to SkillsUSA Nationals)(Used C#.Net)

  21. #21
    Member
    Join Date
    Aug 2009
    Posts
    32

    Re: Icons

    your icon maybe have resolution high than 48 x 48 or resolution higher than 256px

  22. #22
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Icons

    As stated in the FAQ I linked to, 48x48 is not supported by VB, and more than 256 colours is (but only 24 bit, not 32 bit).

  23. #23
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: Icons

    Quote Originally Posted by si_the_geek View Post
    As stated in the FAQ I linked to, 48x48 is not supported by VB, and more than 256 colours is (but only 24 bit, not 32 bit).
    SI, bit depth is of utmost importance I agree. But VB can actually handle almost any size icon less than 256. It won't error on a 256x256 icon, but it won't display it. Here are a couple to play with if anyone wants to validate.

    Edited: I think VB actually treats a 256x256 icon as a 0x0 icon. When loaded into an image control, the image control shrinks to 1x1 (vb doesn't allow 0x0 controls in design time) and is understandable since the internal icon structure has a 256 icon width/height as zero. But those that process icon structures interpret zero to mean 256; just not VB
    Attached Files Attached Files
    Last edited by LaVolpe; Feb 10th, 2010 at 09:10 AM.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  24. #24
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: Icons

    Quote Originally Posted by Simon Canning View Post
    Simon, as mentioned by SI, 32bit icons are not supported by VB. All 3 of your icons are 32bit. I gave you a link in post #19 that has sample code that allows you to use APIs to load and set the icon to your form's window (window icon). That will work for XP & above.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  25. #25
    Hyperactive Member Condomx's Avatar
    Join Date
    Dec 2009
    Location
    Iligan City,Philippines
    Posts
    327

    Re: Icons

    it must be true type and the size is 32 -....16x16..you can use iconfx for resizing it,just search it on google..

    hope it helps..
    but if it so then please rate me coz i am out of reputation..
    ~[L!f3 !s @ll @ab0ut l3@rn!ng]~

    ~*D0nt Give up, h0pe is always present*~

  26. #26
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: Icons

    Quote Originally Posted by Condomx View Post
    it must be true type and the size is 32 -....16x16..
    That is not correct. It does not have to be "true type". VB icons can be 1, 4, 8, 16, 24 bits per pixel and in sizes ranging from 1 to 255.

    32 bit icons can be drawn & assigned to windows using APIs on operating systems that support them. 32 bit icons cannot be assigned to a VB picture or icon property via LoadPicture().
    Last edited by LaVolpe; Feb 11th, 2010 at 08:27 AM.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  27. #27
    Hyperactive Member Condomx's Avatar
    Join Date
    Dec 2009
    Location
    Iligan City,Philippines
    Posts
    327

    Re: Icons

    ty for the correction..
    ~[L!f3 !s @ll @ab0ut l3@rn!ng]~

    ~*D0nt Give up, h0pe is always present*~

  28. #28

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2008
    Posts
    1,260

    Re: Icons

    k, thanks guys.

    Im using
    IcoFX
    , and it is working out really well for me.. thanks

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