Need help with Icons in RES file in VB4 32 bit 
Author Message
 Need help with Icons in RES file in VB4 32 bit

I have encountered two problems in using Icons in a RES file and I was
hoping someone could help.

1.  In Win95, .ICO files can contain both a 16x16 and a 32x32
representation of the same icon.  When you load the icon resource from the
resource file, how can you specify which of the representations gets used?

2.  I have assigned an icon to one of my forms and specified that form for
the application icon.  This icon appears as the application icon in both
the title bar and the task bar, but a different icon appears as the
application icon in Windows Explorer for the .EXE file.  The icon displayed
is one of the other icon resources in the .RES file.  If I remove the .RES
file from my project, Explorer displays the correct icon for the .EXE file.
 Following is as extract from my .RC file.

        10 ICON PRELOAD "Umbrella1.ICO"
        11 ICON PRELOAD "Umbrella2.ICO"
        12 ICON PRELOAD "Umbrella3.ICO"
        13 ICON PRELOAD "Umbrella4.ICO"
        14 ICON PRELOAD "Umbrella5.ICO"
        15 ICON PRELOAD "Umbrella6.ICO"
        16 ICON PRELOAD "Umbrella7.ICO"

        ClsUmb ICON PRELOAD "Umbrella8.ICO"

        Hpyfce ICON PRELOAD "HapyFace.ICO"
        Keybrd ICON PRELOAD "Keyboard.ICO"
        Rocket ICON PRELOAD "Rocket1.ICO"

The icon Explorer displays for the .EXE file is ClsUmb.  If I add another
named icon before ClsUmb, it becomes the icon for the .EXE file.  Can
anyone explain what and why this is happening?

3.  How can one offer a selection of icons for users to choose from as the
.EXE icon?  In Win3.x you could occasionally see a selection of icons for
the application in the <Alt-Enter> dialog box (the equivalent of Win95
properties dialog).

Answers to these questions would be greatly appreciated.

Thanks

T.F. Belliveau   (Dr. T.)



Tue, 29 Jun 1999 03:00:00 GMT  
 Need help with Icons in RES file in VB4 32 bit



Quote:
> I have encountered two problems in using Icons in a RES file and I was
> hoping someone could help.

> 1.  In Win95, .ICO files can contain both a 16x16 and a 32x32
> representation of the same icon.  When you load the icon resource from
the
> resource file, how can you specify which of the representations gets
used?

There may be another way but why load the icon up in your editor and delete
the one you don't want or save it as two files if you want both.

Quote:
> 2.  I have assigned an icon to one of my forms and specified that form
for
> the application icon.  This icon appears as the application icon in both
> the title bar and the task bar, but a different icon appears as the
> application icon in Windows Explorer for the .EXE file.  The icon
displayed
> is one of the other icon resources in the .RES file.  If I remove the
RES
> file from my project, Explorer displays the correct icon for the .EXE
file.
>  Following is as extract from my .RC file.

I think that explorer will use the frist icon in the exe file, try the
desired icon to your res file.

Quote:

> Thanks

> T.F. Belliveau   (Dr. T.)


--
Gary Gilbert



Wed, 30 Jun 1999 03:00:00 GMT  
 Need help with Icons in RES file in VB4 32 bit



Quote:
> I have encountered two problems in using Icons in a RES file and I was
> hoping someone could help.

> 1.  In Win95, .ICO files can contain both a 16x16 and a 32x32
> representation of the same icon.  When you load the icon resource from
the
> resource file, how can you specify which of the representations gets

used?

One way to solve this problem is to save the different formats of the icons
as different .ico files and give them different identifiers in the resource
file.  Just load the one that you want.



Wed, 30 Jun 1999 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. 2nd Retry: VB4-16/32 Putting MID file in a res file

2. Calling 32-bit DLL function from 32-bit VB4 app

3. Converting VB3 -> VB4 32 Bit - Need help

4. VB4 16/32 Bit Programming Help Needed

5. HELP: VB4-16 bit to VB5-32 bit problem

6. Russian(Cyrillic): vb4 32-bit works, but vb4 16-bit doesn't

7. Problem with my apps icons when using SetupWizard (VB4 32-bit version)

8. Need help calling 16-bit app from 32-bit app

9. Using 16 bit dlls in 32 bit VB5.0 - Help needed please

10. Need Help calling 16-bit from 32-bit application

11. Help:How do you de-reference handles in 32-bit VB4--Please Help

12. Converting C 32-bit declaration to VB4 32?

 

 
Powered by phpBB® Forum Software