0
버튼 테두리에 포함되지 않은 모서리를 제거하려고합니다.버튼에서 모서리를 제거하려면 어떻게해야합니까?
나는이 방법으로 내 버튼의 경계를 그릴 :
Private Sub BTN_Connexion_Paint(sender As System.Object, e As System.Windows.Forms.PaintEventArgs) Handles BTN_Connexion.Paint
Me.DrawRectangle(e.Graphics, New Pen(Color.White), 0, 0, BTN_Connexion.Width - 1, BTN_Connexion.Height - 1, 10)
End Sub
Public Sub DrawRectangle(ByVal g As Graphics, ByVal pen As Pen, ByVal x As Int32, ByVal y As Int32, ByVal width As Int32, ByVal height As Int32, ByVal radius As Int32)
'Create a rectangle
Dim area As RectangleF = New RectangleF(x, y, width, height)
Dim path As Drawing2D.GraphicsPath = New Drawing2D.GraphicsPath
'Add the corners
path.AddArc(area.Left, area.Top, radius * 2, radius * 2, 180, 90) 'Upper-Left
path.AddArc(area.Right - (radius * 2), area.Top, radius * 2, radius * 2, 270, 90) 'Upper-Right
path.AddArc(area.Right - (radius * 2), area.Bottom - (radius * 2), radius * 2, radius * 2, 0, 90) 'Lower-Right
path.AddArc(area.Left, area.Bottom - (radius * 2), radius * 2, radius * 2, 90, 90) 'Lower-Left
path.CloseAllFigures()
'Draw the rounded rectangle
g.DrawPath(pen, path)
End Sub
코너는 기본 양식 색상을 취할 수 있습니다. 이처럼 그들은 버튼에 나타나지 않을 것입니다. 그러나 그것이 좋은 습관인지, 더 많이 나는 이것을하는 법을 알지 못했습니다.
그럼 어떻게하면이 코너를 제거 할 수 있습니까?
나는 내 문제를 해결 한