Search code examples
iconswindows-mobilecompact-frameworkwindows-cesmart-device

How to set icon to cab file different than base icon on smart device project


Hello I am developing a smart device application with .net framework 3.5 to windows ce mobile.

I added icon to my project from Properties > Application > icon and manifest.

My icon is a triangle shape and it needs to has transparent background. I added my icon from properties with transparent background so in mobile device application will have a triangle icon for shortcut.

when I create a cab file for my smart device, it takes icon where I defined from Properties > Application > icon and manifest. But my problem is after installing the application by cab file, it creates square shortcut without transparent background (a triangle and white places).

I need my application shotrcut icon to be seen without white places on smart device.

So I think maybe there is a way to set icon while creating cab file so that it does not take the exe's icon and changes it to a squared icon with white places.

Is there any way to solve my problem?

my icon with transparent bg

the icon which cab file produces


Solution

  • I assuming you are talking about a Windows CE (5/6) or Windows Mobile (5/6) project. So we are talking about "Compact Framework 3.5".

    AFAIK only ico files are supported for application icons. That is clear from the file open dialog for Properties > Application > icon and manifest:

    enter image description here

    Your png files are not supported as application icon with transparent background.

    If the icon is edited as resource inside VS2008, there is a special 'transparent' color: enter image description here

    This works fine for the Windows Mobile Start menu:

    enter image description here

    The icon shown for a cab file is defined by the registry and the same for ALL cab files:

    enter image description here enter image description here