vb.net - Convertig an image to an .ICO file without loosing color depth (and without installing additional utilities)? -


In a form I have no ImageList named MainLogoImageList with a 100x100 Pixel 32-bit colorespeed image This is my app logo.

I'm too lazy to set up an icon editor and edit that logo's icon or am transforming the image into a .ICO file. (Ergh, well, I'm not allowed to install custom utilities.)

, I

  Icon = IconFromImage (your forms using MainLogoImageList.Images To set the 'icon (0))   

set the window icon to onload in the event handler.

In the About Me box, I do not have a picture box no image. The in OnLoad event, I use

  LogoPictureBox.Image = MyMainForm.MainLogoImageList.Images (0) symbol = IconFromImage (MyMainForm.MainLogoImageList.Images (0) )   

To set the icon and content of the box

So far, great, the icon looks great to be made from 100x100 pixels bitmap.

A simple "no utility required" way :-) Have a saved icon in .ico file that is IconFromImage so get Will it keep color depth when app is loaded as icon? I really want to use the icon that IconFromImage makes

Using Saving it

  dim's New FileStream ( "MyAppIcon.ico", FileMode.Append, FileAccess.Write, FileShare.Write) as (S) S.Close (Icon.Save)   

mainly For OnLoad event handler and loading that VS In the project properties, the file .ico yields and icon dialog as the app icon that clearly turns into 16 colors, and looks awesome.

This is VB 10 Express.

To take this home, followed the wise teacher, it was edited and transformed there.

GIMP @ home at work

worked fine, looks good.

There is no code-free solution at all: -)

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -