Imports System.Drawing
Imports System.ComponentModel
Public Class winxpbutton
Inherits System.Windows.Forms.Button
Private my_mouseDown As Boolean = False '鼠标按下
Private my_mouseHover As Boolean = False '鼠标移到上面
Private m_textcolor As Color = System.Drawing.Color.Black '字体颜色
_
Public Property textcolor() As Color
Get
Return m_textcolor
End Get
Set(ByVal Value As Color)
m_textcolor = Value
Me.Invalidate()
End Set
End Property
Public Sub New()
MyBase.New()
'该调用是 Windows 窗体设计器所必需的。
InitializeComponent()
'在 InitializeComponent() 调用之后添加任何初始化,true表示将指定的样式应用到控件
'设置控件样式位能够充分地更改控件行为
Me.SetStyle(ControlStyles.UserPaint, True)