日期:2014-05-17 浏览次数:20796 次
Imports System.Collections.Generic
Imports System.Text
Imports System.Windows.Forms
Imports System.Drawing
Imports System.Drawing.Drawing2D
Imports System.ComponentModel
Public Class buttonEx
Inherits Button
Private _baseColor As Color = Color.FromArgb(160, 199, 223)
Private _controlState As ControlState
Private _imageWidth As Integer = 18
Private _roundStyle As RoundStyle = RoundStyle.All
Private _radius As Integer = 8
Public Sub New()
MyBase.New()
SetStyle(ControlStyles.UserPaint Or ControlStyles.AllPaintingInWmPaint Or ControlStyles.OptimizedDoubleBuffer Or ControlStyles.ResizeRedraw Or ControlStyles.SupportsTransparentBackColor, True)
End Sub
<DefaultValue(GetType(Color), "160, 199, 223")> _
Public Property BaseColor() As Color
Get
Return _baseColor
End Get
Set(ByVal value As Color)
_baseColor = value
MyBase.Invalidate()
End Set
End Property
<DefaultValue(18)> _
Public Property ImageWidth() As Integer
Get
Return _imageWidth