简体   繁体   中英

Remove gray border from button when it loses focus

I have implemented a control for a button that shows a mouse click effect. I just update the button location on mouse down and mouse up to show the effect. The button has a png picture with a transparent background. When I click the button and then click on a second form, I can see a gray border around the button. Can you advise how I can remove it? Please see the attached picture.

在此处输入图像描述

The fore color was set to transparent. I can see that if I change it to red then the border is red. This means that this problem is realted to the fore color

This line fixes it

        public override void NotifyDefault(bool value) => base.NotifyDefault(false);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM