Search code examples
imagevisual-studiobuttoncustomtaskpane

In Visual Studio, how to solve Button image Quality?


I am using Visual Studio 2019 to build an Excel Addin with a Custom Task Pane.

  • In the User Control used as Custom Task Pane, i added imlNavigation(ImageList)
  • I tried to generate transparent Images PNG with size [512,512] and attached it with the Buttons, but the Quality is very poor
  • I tried to generate transparent Images PNG [16,16] but no changes.

Below is the screenshot. And even the transparency is not good. We still see those white colors around the pictures:

enter image description here

Can anyone please suggest me what exactly I shall do as I am still new in Visual Studio?

  • Where could I get transparent Icons/Images to use for my Buttons?
  • What Extension shall I use if necessary to get them easily attached with my Buttons?
  • Where do I fail and I should still learn regarding the buttons?

I am willing to learn and to follow you instructions and suggestions. Thank you in advance!


Solution

  • May be instead of using image list you can use Image Resources?

    1. Click on the Button
    2. On your property click on the assist button of image
    3. From the Select Resource Dialog box, click on Project Resource File
    4. Import you pictures (Png transparent) better 25-25px or 20-20px based on the size of your button. It accepts transparent images as well

    This should improve the quality of your button images.

    enter image description here