Dhairya Bhardwaj Dhairya Bhardwaj - 1 year ago 91
C# Question

How to remove black outlines on buttons after clicking on form in windows forms

i am making a flat GUI in windows forms.. i know i cant just ignore and leave tab indexing and i have included it. when i am using tab in my program to select control,a black outline appears on controls(as in this pic). what i want is to remove this outlining when i mouse-click anywhere because it seems Ugly if i am not using my keyboard.

how can i remove this outline on flat button

can you suggest me how can i achieve this target?

Answer Source

Try hiding the focus cue by creating your own button:

public class ButtonEx : Button {

  protected override bool ShowFocusCues {
    get {
      return false;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download