日期:2014-05-17 浏览次数:21067 次
Protected Overrides Sub OnEnabledChanged(ByVal e As System.EventArgs)
MyBase.OnEnabledChanged(e)
If Me.Enabled Then
Me.SetStyle(ControlStyles.UserPaint, False)
Else
Me.SetStyle(ControlStyles.UserPaint, True)
End If
Me.Invalidate()
End Sub
Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs)
MyBase.OnPaint(e)
Dim b As System.Drawing.SolidBrush = New System.Drawing.SolidBrush(Me.ForeColor)
e.Graphics.DrawString(Me.Text, Me.Font, b, Me.ClientRectangle())
End Sub