📄 tonypecaobuton.ctl
字号:
End Sub
Public Property Get BackColor() As OLE_COLOR
BackColor = BackC
End Property
Public Property Let BackColor(ByVal theCol As OLE_COLOR)
BackC = theCol
If Not Ambient.UserMode Then BackO = theCol
Call SetColors
Call Redraw(lastStat, True)
PropertyChanged "BCOL"
End Property
Public Property Get BackOver() As OLE_COLOR
BackOver = BackO
End Property
Public Property Let BackOver(ByVal theCol As OLE_COLOR)
BackO = theCol
Call SetColors
Call Redraw(lastStat, True)
PropertyChanged "BCOLO"
End Property
Public Property Get ForeColor() As OLE_COLOR
ForeColor = ForeC
End Property
Public Property Let ForeColor(ByVal theCol As OLE_COLOR)
ForeC = theCol
If Not Ambient.UserMode Then ForeO = theCol
Call SetColors
Call Redraw(lastStat, True)
PropertyChanged "FCOL"
End Property
Public Property Get ForeOver() As OLE_COLOR
ForeOver = ForeO
End Property
Public Property Let ForeOver(ByVal theCol As OLE_COLOR)
ForeO = theCol
Call SetColors
Call Redraw(lastStat, True)
PropertyChanged "FCOLO"
End Property
Public Property Get MaskColor() As OLE_COLOR
MaskColor = MaskC
End Property
Public Property Let MaskColor(ByVal theCol As OLE_COLOR)
MaskC = theCol
Call SetColors
Call Redraw(lastStat, True)
PropertyChanged "MCOL"
End Property
Public Property Get ButtonType() As ButtonTypes
ButtonType = MyButtonType
End Property
Public Property Let ButtonType(ByVal newValue As ButtonTypes)
MyButtonType = newValue
If MyButtonType = [Java metal] And Not Ambient.UserMode Then
UserControl.FontBold = True
ElseIf MyButtonType = 11 And isShown Then
Call GetParentPic
End If
Call UserControl_Resize
PropertyChanged "BTYPE"
End Property
Public Property Get Caption() As String
Caption = elTex
End Property
Public Property Let Caption(ByVal newValue As String)
elTex = newValue
Call SetAccessKeys
Call CalcTextRects
Call Redraw(0, True)
PropertyChanged "TX"
End Property
Public Property Get Enabled() As Boolean
Enabled = isEnabled
End Property
Public Property Let Enabled(ByVal newValue As Boolean)
isEnabled = newValue
Call Redraw(0, True)
UserControl.Enabled = isEnabled
PropertyChanged "ENAB"
End Property
Public Property Get Font() As Font
Set Font = UserControl.Font
End Property
Public Property Set Font(ByRef newFont As Font)
Set UserControl.Font = newFont
Call CalcTextRects
Call Redraw(0, True)
PropertyChanged "FONT"
End Property
Public Property Get FontBold() As Boolean
FontBold = UserControl.FontBold
End Property
Public Property Let FontBold(ByVal newValue As Boolean)
UserControl.FontBold = newValue
Call CalcTextRects
Call Redraw(0, True)
End Property
Public Property Get FontItalic() As Boolean
FontItalic = UserControl.FontItalic
End Property
Public Property Let FontItalic(ByVal newValue As Boolean)
UserControl.FontItalic = newValue
Call CalcTextRects
Call Redraw(0, True)
End Property
Public Property Get FontUnderline() As Boolean
FontUnderline = UserControl.FontUnderline
End Property
Public Property Let FontUnderline(ByVal newValue As Boolean)
UserControl.FontUnderline = newValue
Call CalcTextRects
Call Redraw(0, True)
End Property
Public Property Get FontSize() As Integer
FontSize = UserControl.FontSize
End Property
Public Property Let FontSize(ByVal newValue As Integer)
UserControl.FontSize = newValue
Call CalcTextRects
Call Redraw(0, True)
End Property
Public Property Get FontName() As String
FontName = UserControl.FontName
End Property
Public Property Let FontName(ByVal newValue As String)
UserControl.FontName = newValue
Call CalcTextRects
Call Redraw(0, True)
End Property
Public Property Get ColorScheme() As ColorTypes
ColorScheme = MyColorType
End Property
Public Property Let ColorScheme(ByVal newValue As ColorTypes)
MyColorType = newValue
Call SetColors
Call Redraw(0, True)
PropertyChanged "COLTYPE"
End Property
Public Property Get ShowFocusRect() As Boolean
ShowFocusRect = showFocusR
End Property
Public Property Let ShowFocusRect(ByVal newValue As Boolean)
showFocusR = newValue
Call Redraw(lastStat, True)
PropertyChanged "FOCUSR"
End Property
Public Property Get MousePointer() As MousePointerConstants
MousePointer = UserControl.MousePointer
End Property
Public Property Let MousePointer(ByVal newPointer As MousePointerConstants)
UserControl.MousePointer = newPointer
PropertyChanged "MPTR"
End Property
Public Property Get MouseIcon() As StdPicture
Set MouseIcon = UserControl.MouseIcon
End Property
Public Property Set MouseIcon(ByVal newIcon As StdPicture)
On Local Error Resume Next
Set UserControl.MouseIcon = newIcon
PropertyChanged "MICON"
On Error GoTo 0
End Property
Public Property Get HandPointer() As Boolean
HandPointer = useHand
End Property
Public Property Let HandPointer(ByVal newVal As Boolean)
useHand = newVal
If useHand Then
UserControl.MousePointer = 99
Else
Set UserControl.MouseIcon = Nothing
UserControl.MousePointer = 1
End If
PropertyChanged "HAND"
End Property
Public Property Get hwnd() As Long
hwnd = UserControl.hwnd
End Property
Public Property Get SoftBevel() As Boolean
SoftBevel = isSoft
End Property
Public Property Let SoftBevel(ByVal newValue As Boolean)
isSoft = newValue
Call SetColors
Call Redraw(lastStat, True)
PropertyChanged "SOFT"
End Property
Public Property Get PictureNormal() As StdPicture
Set PictureNormal = picNormal
End Property
Public Property Set PictureNormal(ByVal newPic As StdPicture)
Set picNormal = newPic
Call CalcPicSize
Call CalcTextRects
Call Redraw(lastStat, True)
PropertyChanged "PICN"
End Property
Public Property Get PictureOver() As StdPicture
Set PictureOver = picHover
End Property
Public Property Set PictureOver(ByVal newPic As StdPicture)
Set picHover = newPic
If isOver Then Call Redraw(lastStat, True)
PropertyChanged "PICO"
End Property
Public Property Get PicturePosition() As PicPositions
PicturePosition = PicPosition
End Property
Public Property Let PicturePosition(ByVal newPicPos As PicPositions)
PicPosition = newPicPos
PropertyChanged "PICPOS"
Call CalcTextRects
Call Redraw(lastStat, True)
End Property
Public Property Get UseMaskColor() As Boolean
UseMaskColor = useMask
End Property
Public Property Let UseMaskColor(ByVal newValue As Boolean)
useMask = newValue
If Not picNormal Is Nothing Then Call Redraw(lastStat, True)
PropertyChanged "UMCOL"
End Property
Public Property Get UseGreyscale() As Boolean
UseGreyscale = useGrey
End Property
Public Property Let UseGreyscale(ByVal newValue As Boolean)
useGrey = newValue
If Not picNormal Is Nothing Then Call Redraw(lastStat, True)
PropertyChanged "NGREY"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -