Icon as picture

Can I use an icon file as an image for a button in the visual base?

fe I have 3 buttons that should have 3 icons, when you click a button, the button icon should be a shape icon, is that possible?

btnIcon1 = my.resources.ICO1

btnIcon2 = my.resources.ICO2

+3
source share
1 answer

The easiest way to do this:

myButton.Image = Me.Icon.ToBitmap

You can also use:

myButton.Image = My.Resources.myIcon.ToBitmap

Both of these methods extract and use the 32x32 icon from the .ico file.

+8
source

Source: https://habr.com/ru/post/1750088/


All Articles