Is it possible to remove the border of a standard C# Button
? I know that I could set the FlatStyle
property to Flat
and customize the FlatAppearance
property to hide the border but I would prefer to use the Standard
property to ensure that the control appears under all operating systems like a default Button
. Did you have any suggestions how I can solve this issue? I am working with a Windows Forms Application.
Asked
Active
Viewed 1,376 times
1

Manfred Muckler
- 51
- 10
-
are you working with winforms, wpf, ..etc.. ? – Mong Zhu Sep 20 '17 at 07:55
-
What do you mean standard property? You don't want to change FlatStyle but you want to change the "standard properties"? – Willy David Jr Sep 20 '17 at 07:58
-
Does this help? https://stackoverflow.com/questions/9966462/remove-button-border-on-tab-c-sharp-winforms – Peter Abolins Sep 20 '17 at 07:59
-
"Standard" is a member of the FlatStyle-Enumeration. I want keep the Standard property but without the border. This is important for the right appearance under different Windows versions. – Manfred Muckler Sep 20 '17 at 08:01
-
@PeterAbolins I already read this but it doesn't worked for me. – Manfred Muckler Sep 20 '17 at 08:02
-
The border is drawn by the renderer of the Button control, the code that implements its OnPaint() method. That code is wrapped inside an adapter class, there are 13 of them. Each dedicated to a specific button type and the FlatStyle. Sadly Microsoft decided to make them all `internal`, so you can't monkey with them. So you'd have to make your own, that can be as simple as a PictureBox. Making it animate and focus-aware and implementing IButtonControl takes more work. – Hans Passant Sep 20 '17 at 09:23
2 Answers
0
You could use an image and make it clickable, that is one way to avoid the borders, but there are several options. Good luck!

K_Nielsen...
- 25
- 4
0
If you are using windows forms and trying to implement Flat UI, Material UI, Metro-Looking controls, you're in hell. It is has limited properties for customizations unless you know how to work with Graphics
and Animation
. You'll have to use imagebox or picture box and dynamically change its image on different events.
I'll suggest WPF
or Windows Presentation Foundation
for a more customizable User Interface.

Mr. Leeds
- 154
- 2
- 11