继续:
Public Property Get PictureHover() As Picture
Set PictureHover = m_PictureHover
End Property
Public Property Set PictureHover(ByVal New_PictureHover As Picture)
Set m_PictureHover = New_PictureHover
PropertyChanged "PictureHover"
End Property
Public Property Get XPColor_Pressed() As OLE_COLOR
XPColor_Pressed = m_XPColor_Pressed
End Property
Public Property Let XPColor_Pressed(ByVal New_XPColor_Pressed As OLE_COLOR)
m_XPColor_Pressed = New_XPColor_Pressed
PropertyChanged "XPColor_Pressed"
End Property
Public Property Get XPColor_Hover() As OLE_COLOR
XPColor_Hover = m_XPColor_Hover
End Property
Public Property Let XPColor_Hover(ByVal New_XPColor_Hover As OLE_COLOR)
m_XPColor_Hover = New_XPColor_Hover
PropertyChanged "XPColor_Hover"
End Property
Public Property Get XPDefaultColors() As Boolean
XPDefaultColors = m_XPDefaultColors
End Property
Public Property Let XPDefaultColors(ByVal New_XPDefaultColors As Boolean)
m_XPDefaultColors = New_XPDefaultColors
PropertyChanged "XPDefaultColors"
End Property
Public Property Get BackColor() As OLE_COLOR
BackColor = m_BackColor
End Property
Public Property Let BackColor(ByVal New_BackColor As OLE_COLOR)
m_BackColor = New_BackColor
PropertyChanged "BackColor"
UserControl.BackColor = m_BackColor
Refresh
End Property
Public Property Get ForeColor() As OLE_COLOR
ForeColor = m_ForeColor
End Property
Public Property Let ForeColor(ByVal New_ForeColor As OLE_COLOR)
m_ForeColor = New_ForeColor
PropertyChanged "ForeColor"
UserControl.ForeColor = m_ForeColor
Refresh
End Property
Public Property Get SoundOver() As Variant
SoundOver = m_SoundOver
End Property
Public Property Let SoundOver(ByVal New_SoundOver As Variant)
m_SoundOver = New_SoundOver
PropertyChanged "SoundOver"
End Property
Public Property Get SoundClick() As String
SoundClick = m_SoundClick
End Property
Public Property Let SoundClick(ByVal New_SoundClick As String)
m_SoundClick = New_SoundClick
PropertyChanged "SoundClick"
End Property
Public Property Get version() As String
version = UserControl.Tag
End Property
Public Property Let version(ByVal New_version As String)
End Property
Private Function PlayASound(SoundFile As String) As Byte
PlayASound = PlaySound(SoundFile, 1, &H20000 + &H0 + &H1 + &H2)
End Function
Public Property Get DefCurHand() As Boolean
DefCurHand = m_DefCurHand
End Property
Public Property Let DefCurHand(ByVal New_DefCurHand As Boolean)
m_DefCurHand = New_DefCurHand
PropertyChanged "DefCurHand"
If m_DefCurHand = True Then
Else
End If
End Property
Public Property Get XPShowBorderAlways() As Boolean
XPShowBorderAlways = m_XPShowBorderAlways
End Property
Public Property Let XPShowBorderAlways(ByVal New_XPShowBorderAlways As Boolean)
m_XPShowBorderAlways = New_XPShowBorderAlways
PropertyChanged "XPShowBorderAlways"
End Property
Public Property Get MaskColor() As OLE_COLOR
MaskColor = m_MaskColor
End Property
Public Property Let MaskColor(ByVal New_MaskColor As OLE_COLOR)
m_MaskColor = New_MaskColor
PropertyChanged "MaskColor"
Refresh
End Property
Public Property Get TransparentBG() As Boolean
TransparentBG = m_TransparentBG
End Property
Public Property Let TransparentBG(ByVal New_TransparentBG As Boolean)
m_TransparentBG = New_TransparentBG
PropertyChanged "TransparentBG"
Refresh
End Property
Public Property Get BEVEL() As Integer
BEVEL = m_BEVEL
End Property
Public Property Let BEVEL(ByVal New_BEVEL As Integer)
m_BEVEL = New_BEVEL
PropertyChanged "BEVEL"
Refresh
End Property
Public Property Get BEVELDEPTH() As Integer
BEVELDEPTH = m_BEVELDEPTH
End Property
Public Property Let BEVELDEPTH(ByVal New_BEVELDEPTH As Integer)
m_BEVELDEPTH = New_BEVELDEPTH
PropertyChanged "BEVELDEPTH"
Refresh
End Property
Private Function COLOR_LongToRGB(UniColorValue As Long) As RGB
Dim BlueS As Double, GreenS As Double, RGBs As String
COLOR_LongToRGB.blue = Fix((UniColorValue / 256) / 256)
BlueS = (COLOR_LongToRGB.blue * 256) * 256
COLOR_LongToRGB.Green = Fix((UniColorValue - BlueS) / 256)
GreenS = COLOR_LongToRGB.Green * 256
COLOR_LongToRGB.Red = Fix(UniColorValue - BlueS - GreenS)
End Function
Private Function COLOR_UniColor(ColorVal As Long) As Long
COLOR_UniColor = ColorVal
If ColorVal > &HFFFFFF Or ColorVal < 0 Then COLOR_UniColor = GetSysColor(ColorVal And &HFFFFFF)
End Function
Private Function COLOR_DarkenLightenColor(ByVal Color As Long, ByVal Value As Long) As Long
Dim R As Long, G As Long, B As Long
B = ((Color \ &H10000) Mod &H100): B = B + ((B * Value) \ &HC0)
G = ((Color \ &H100) Mod &H100) + Value
R = (Color And &HFF) + Value
If R < 0 Then R = 0
If R > 255 Then R = 255
If G < 0 Then G = 0
If G > 255 Then G = 255
If B < 0 Then B = 0
If B > 255 Then B = 255
COLOR_DarkenLightenColor = RGB(R, G, B)
End Function
Private Sub DrawLine(ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long, ByVal Color As Long)
Dim pt As POINTAPI
Call DeleteObject(SelectObject(hdc, CreatePen(0, 1, Color)))
MoveToEx hdc, X1, Y1, pt
LineTo hdc, X2, Y2
End Sub
Private Sub DRAWRECT(DestHDC As Long, ByVal RectLEFT As Long, ByVal RectTOP As Long, ByVal RectRIGHT As Long, ByVal RectBOTTOM As Long, ByVal MyColor As Long, Optional FillRectWithColor As Byte = 0)
Dim MyRect As RECT, Firca As Long
Firca = CreateSolidBrush(COLOR_UniColor(MyColor))
With MyRect
.Left = RectLEFT
.Top = RectTOP
.Right = RectRIGHT
.Bottom = RectBOTTOM
End With
If FillRectWithColor = 1 Then FillRect DestHDC, MyRect, Firca Else FrameRect DestHDC, MyRect, Firca
DeleteObject Firca
End Sub
本帖版权归ryu所有.如果引用本帖,请注明帖子的出处和作者;本帖如系引用,其版权归原作者所有.