Results 1 to 17 of 17

Thread: VB6 really 24bpp icons? not 25bpp?

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2013
    Posts
    894

    VB6 really 24bpp icons? not 25bpp?

    I found that thread that is about which ico format vb6 accept.

    It is kinda weird, but an unpatch win10 will asks to my vb6 apps to draw icons in 32bpp and VBA can't so it gives "Invalid Image" little error messagebox, even before the form load and no error code number, and I was commiting the error of having 32bitpp.

    This is kinda weird, because it worked with vista, win 7, win 8, and most win10s, but this customer has maybe a win10 which is not patched and you know not preciselly very original. Maybe correct win10 never will asks to an VB6 app to chose the fully 32bits version from the resource.



    Some link later, someone say, use the icoFX app was free sometime.

    Ok I got it.

    but what it does when you select 24bpp, and save it, in the icon properties at explorer say in details it is 32bpp.

    Now, 24bpp, I was reading about, means, 0RGB, or 1 alpha bit channel, plus RGB, so 25bpp, and all the rest just zeroes bits?

    so, what exactly vb6 support this 0RGB or, 1bit alpha plus RGB??

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

    Re: VB6 really 24bpp icons? not 25bpp?

    Icon format is a bit flexible, but its pixel format, per bit depth, is pretty much set in stone.

    24bpp: pixel data is 3 bytes (24bpp), there is no 25th bit, can't be. The mask bits define which pixels are transparent; there is no alpha byte

    32bpp: pixel data is 4 bytes (3 bytes for pixel color & 1 byte for the alpha value). The mask bits are mostly ignored, but can be used by Windows in some APIs like DrawIconEx and passing DI_MASK as the final parameter in that API.

    Since Vista I think, VB will accept 32bpp icons in control properties, but may not draw them correctly. Still can't add a 32bpp icon in a resource file using VB's resource editor.

    Edited: If you add a 32bpp icon to a control property (Vista and higher) and run the app on XP or lower, you will likely get that error.

    None of the above specifically addresses VBA, just VB
    Last edited by LaVolpe; Jul 31st, 2018 at 03:52 PM.
    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}

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2013
    Posts
    894

    Re: VB6 really 24bpp icons? not 25bpp?

    Well, ok, but, why it gives the error in Win 10? what can be the scenario, because I only checked that the icons I was using are in properties show as 32bits, and with IconFX can't do real 24bpp because for that software 24bpp just creates 0RGB, not RGBRGB, include it adds 1 bit alpha, they call it a mask.

    but the weird thing, is that 32x32x3 = 3072 bytes, now with some overhead.... filesize is , 3262 bytes.

    Now, 32x32x4 = 4096 bytes....

    so , it is real, thinking in filesize as a 24bpp.

    but, if you look in ico property, details tab, win10 say it is 32bits.

    and the icon, show like if it has alpha 1bit, so it is 100% transparent or 100% opaque each pixel.

    so, it is a bug in win10 properties dialog?

    and why at the customer it will give invalid image, just to load the ico my exe has?

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

    Re: VB6 really 24bpp icons? not 25bpp?

    If you can zip it up and upload it, we can take a quick look

    P.S. a 24bpp 32x32 icon is 3262 bytes
    - required icon directory structure (1 icon): 22 bytes
    - required bitmap info structure (1 icon): 40 bytes
    - dWord aligned pixel data (1 icon @ 32x32 @ 24bpp): 3072 bytes
    - dWord aligned mask data (1 icon @ 32x32 @ 1bpp): 128 bytes
    - total: 22 + 40 + 3072 + 128 = 3262
    Last edited by LaVolpe; Jul 31st, 2018 at 07:31 PM.
    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}

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2013
    Posts
    894

    Re: VB6 really 24bpp icons? not 25bpp?

    Quote Originally Posted by LaVolpe View Post
    If you can zip it up and upload it, we can take a quick look

    P.S. a 24bpp 32x32 icon is 3262 bytes
    - required icon directory structure (1 icon): 22 bytes
    - required bitmap info structure (1 icon): 40 bytes
    - dWord aligned pixel data (1 icon @ 32x32 @ 24bpp): 3072 bytes
    - dWord aligned mask data (1 icon @ 32x32 @ 1bpp): 128 bytes
    - total: 22 + 40 + 3072 + 128 = 3262
    ahhhhhhhhhhhhhhhh!!! the mask is separated from the color information!!!!! that was confusing me it.

    and so, why win10 said it is 32bitsbpp? in details tab?

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

    Re: VB6 really 24bpp icons? not 25bpp?

    Quote Originally Posted by flyguille View Post
    ... and so, why win10 said it is 32bitsbpp? in details tab?
    Good question. It obviously is wrong because a 32bpp version of that icon @ 32x32 would be 1kb larger file.

    BTW: A known 24bpp icon on my system (Win10) also shows the icon at 32bpp in the file properties dialog.
    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}

  7. #7

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2013
    Posts
    894

    Re: VB6 really 24bpp icons? not 25bpp?

    Quote Originally Posted by LaVolpe View Post
    Good question. It obviously is wrong because a 32bpp version of that icon @ 32x32 would be 1kb larger file.

    BTW: A known 24bpp icon on my system (Win10) also shows the icon at 32bpp in the file properties dialog.
    ok thanks for the confirmation.

    and what else can give the invalid image apart from the bitdeep?

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

    Re: VB6 really 24bpp icons? not 25bpp?

    Quote Originally Posted by flyguille View Post
    ... and what else can give the invalid image apart from the bitdeep?
    Can you zip it up and post it? I can load my 24bpp icon in VB control properties. Are you trying to put the icon in something else?
    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}

  9. #9

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2013
    Posts
    894

    Re: VB6 really 24bpp icons? not 25bpp?

    Quote Originally Posted by LaVolpe View Post
    Can you zip it up and post it? I can load my 24bpp icon in VB control properties. Are you trying to put the icon in something else?
    I will explain, I have those icons since, yr 2010, the same icons, include there is an EXE installer, which just has that, a simple icon.

    And in this customer win 10 machine, the EXE just throw that error, invalid image, but there is the problem, reset the machine, sometimes the exe loads and run, and sometimes gives the Invalid image.

    from 42 machines with the same win10, maybe 2 machines per day stops executing my exes, and give the error invalid image.

    So, I didn't believe that.

    anydesk, remote control, and yes, the main exe app didn't execute at all, or at leas it don't show a single form.

    So, hey, maybe virus, maybe yout iscsi solution, maybe your network is noisy, so I during remote control, redownload the package, and It didn't execute THE INSTALLER, which it is just plain forms, native controls, and the MAIN form , the one which executes first, is just a icon, a label, and a timer, that form, just suscribe the OCX, and ends switching to other form, but that simple form which runs for about 3 secons, don't show. So, ***... it is the resolution? no , HD, it is using a weird ppp? not, 100% font scaling, default setup, it is using a weird theme?, I switch back to the default win10 theme, and not, also wasn't that.

    And incredible, the only thing, for sure it is a pirated win 10, without basic patchs (at the moment it was pirated), now.

    I did more tests, ran another vb6 util which hasn't icons, and it run, it was OK, so , it is not like the vb6 runtime or something, So, I give up with the remote control, and starts reading forun , and forums said, it is related to icons.

  10. #10

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2013
    Posts
    894

    Re: VB6 really 24bpp icons? not 25bpp?

    I confirm that the icons which I use since 2010 are 3262 bytes length.

    so for sure 24bpp.... and now what?

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

    Re: VB6 really 24bpp icons? not 25bpp?

    If the icon is valid, don't know what to tell you. Just because it is the right file size doesn't mean it was written correctly. One O/S may let little things go and another doesn't. If you don't zip up your icon(s) so we can look at how they were written, we can't help verify the icon is written correctly.
    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}

  12. #12

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2013
    Posts
    894

    Re: VB6 really 24bpp icons? not 25bpp?

    no, the main EXE icon is 3262, but the icon at the initial form is from unkown source, it is just a little icon from for sure a win7 windows dlll.... for sure, showing software box plus the cpu , je...... I must go back with the customer and check all exes
    Last edited by flyguille; Jul 31st, 2018 at 08:27 PM.

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

    Re: VB6 really 24bpp icons? not 25bpp?

    good luck
    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}

  14. #14

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2013
    Posts
    894

    Re: VB6 really 24bpp icons? not 25bpp?

    I get back to the customer, remote control. And it was veryyyy curius, there was already a instance of the exe running fine, but if I attempt to run it twice, it give the Invalid Image error.

    The things is, when the machine turn on, the software runs fine, until a certain period, then it start to be unable to run

    I assume as these diskless ISCSI machines, that the windows gets an update and somehow it broke the compatibility, and it does every time the machine turn on, because as frozen state, any change to the virtual disk are undone.




    So, I recompile it, and run it at the same time the original eXE with the original icos was failing, and YES, it runs!... so confirmed, was just the icons.


    Checking it, the original icons, I grab some, didn't has the source of all icons, it looks strange..


    Icons described as 32x32 x 32bpp, are just file size like 506 bytes.... not 4K. And it looks, like that , they looks like true color plus alpha , but just 506 bytes!.


    I was using some sort of *compressed icons* and VB6 accepted those ??? is that a thing??

  15. #15
    Hyperactive Member
    Join Date
    Sep 2014
    Posts
    373

    Re: VB6 really 24bpp icons? not 25bpp?

    ICO files, be they single-icon, multi-icon or mixed-item ones, are of a straight-forward file format. If an actual file is uploaded here, either LaVolpe or myself can pinpoint what is wrong with the icon file within minutes.

    Edited:
    If there are more than one defective icons, just ZIP them, and specific answer(s) would be given.
    Last edited by Brenker; Aug 2nd, 2018 at 10:26 AM.

  16. #16

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2013
    Posts
    894

    Re: VB6 really 24bpp icons? not 25bpp?

    Mistery solved....

    Happens this:

    Name:  failinwin1.jpg
Views: 315
Size:  33.0 KB

    the problem is this

    Name:  temp.jpg
Views: 287
Size:  28.0 KB

    This customer frozen ISCSI implementation (diskless) is failing.

    without a working TEMP folder, VB6 can't do things, do not 'know exactly why, because I compliled just an empty project, and it worked....

    but my apps, don't.

    And all with brand new icons from icoFX. 32x32x24 plus 16x16x24

    I checked that folder because of this:

    https://support.microsoft.com/es-ar/...nvalid-picture

    Customers from hell, I have.!!!!
    Last edited by flyguille; Aug 4th, 2018 at 07:19 PM.

  17. #17

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2013
    Posts
    894

    Re: VB6 really 24bpp icons? not 25bpp?

    just for curiosity anyone know why and how VB6 uses the TEMP folder at all? include if it don't use it in the code?.

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