HEY there I was asking about how to make a borderless button in vb.net I can always set the style to flat and make the background color as transparent but always I always get the button focused and shows in a shape of a button which ruins my button style that I want it
here is a class I used earlier but it didn't work
Public Class ButtonEx
Private _ShouldShowFocus As Boolean = False
Public Property ShouldShowFocus() As Boolean
Set(ByVal value As Boolean)
_ShouldShowFocus = value
Protected Overrides ReadOnly Property ShowFocusCues() As Boolean
You could subclass the standard button and override the OnPaint method to achieve a borderless button.
Class BorderlessButton Inherits Button Protected Overrides Sub OnPaint(ByVal pe As PaintEventArgs) MyBase.OnPaint(pe) pe.Graphics.DrawRectangle(New Pen(BackColor, 5), ClientRectangle) End Sub End Class
I'm assuming you've tried out the
Button.FlatAppearance properties and none of these help to solve your problem.