?? xpframe.ctl
字號:
End Property
'FooterFillStyle
Public Property Get FooterFillStyle() As FillStyle
Attribute FooterFillStyle.VB_Description = "Gets/Sets the footer fill style"
Attribute FooterFillStyle.VB_ProcData.VB_Invoke_Property = ";Footer"
FooterFillStyle = m_eFooterFillStyle
End Property
Public Property Let FooterFillStyle(ByVal eFooterFillStyle As FillStyle)
m_eFooterFillStyle = eFooterFillStyle
Call DrawControl
Call UserControl.Refresh
Call UserControl.PropertyChanged("FooterFillStyle")
End Property
'
'
'#Container
'ContainerTextFont
Public Property Get ContainerTextFont() As Font
Attribute ContainerTextFont.VB_Description = "Gets/Sets the container text font"
Attribute ContainerTextFont.VB_ProcData.VB_Invoke_Property = ";Container"
Set ContainerTextFont = m_fContainerTextFont
End Property
Public Property Set ContainerTextFont(objContainerTextFont As Font)
Set m_fContainerTextFont = objContainerTextFont
Call DrawControl
Call UserControl.Refresh
Call UserControl.PropertyChanged("ContainerTextFont")
End Property
'BackColor
Public Property Get ContainerBackColor() As OLE_COLOR
Attribute ContainerBackColor.VB_Description = "Gets/Sets the container back color"
Attribute ContainerBackColor.VB_ProcData.VB_Invoke_Property = ";Container"
ContainerBackColor = m_oContainerBackColor
End Property
Public Property Let ContainerBackColor(ByVal objContainerBackColor As OLE_COLOR)
m_oContainerBackColor = objContainerBackColor
Call DrawControl
Call UserControl.Refresh
Call UserControl.PropertyChanged("ContainerBackColor")
End Property
'FadeColor
Public Property Get ContainerFadeColor() As OLE_COLOR
Attribute ContainerFadeColor.VB_Description = "Gets/Sets the container fade color"
Attribute ContainerFadeColor.VB_ProcData.VB_Invoke_Property = ";Container"
ContainerFadeColor = m_oContainerFadeColor
End Property
Public Property Let ContainerFadeColor(ByVal objContainerFadeColor As OLE_COLOR)
m_oContainerFadeColor = objContainerFadeColor
Call DrawControl
Call UserControl.Refresh
Call UserControl.PropertyChanged("ContainerFadeColor")
End Property
'FillStyle
Public Property Get ContainerFillStyle() As FillStyle
Attribute ContainerFillStyle.VB_Description = "Gets/Sets the container fill style"
Attribute ContainerFillStyle.VB_ProcData.VB_Invoke_Property = ";Container"
ContainerFillStyle = m_eContainerFillStyle
End Property
Public Property Let ContainerFillStyle(ByVal eContainerFillStyle As FillStyle)
m_eContainerFillStyle = eContainerFillStyle
Call DrawControl
Call UserControl.Refresh
Call UserControl.PropertyChanged("ContainerFillStyle")
End Property
'ForeColor
Public Property Get ContainerForeColor() As OLE_COLOR
Attribute ContainerForeColor.VB_Description = "Gets/Sets the container fore color"
Attribute ContainerForeColor.VB_ProcData.VB_Invoke_Property = ";Container"
ContainerForeColor = m_oContainerForeColor
End Property
Public Property Let ContainerForeColor(ByVal objContainerForeColor As OLE_COLOR)
m_oContainerForeColor = objContainerForeColor
Call DrawControl
Call UserControl.Refresh
Call UserControl.PropertyChanged("ContainerForeColor")
End Property
'BorderColor
Public Property Get ContainerBorderColor() As OLE_COLOR
Attribute ContainerBorderColor.VB_Description = "Gets/Sets the border color"
Attribute ContainerBorderColor.VB_ProcData.VB_Invoke_Property = ";Border"
ContainerBorderColor = m_oContainerBorderColor
End Property
Public Property Let ContainerBorderColor(ByVal objContainerBorderColor As OLE_COLOR)
m_oContainerBorderColor = objContainerBorderColor
Call DrawControl
Call UserControl.Refresh
Call UserControl.PropertyChanged("ContainerBorderColor")
End Property
'BorderStyle
Public Property Get ContainerBorderStyle() As TraceBorderStyle
Attribute ContainerBorderStyle.VB_Description = "Gets/Sets the border style"
Attribute ContainerBorderStyle.VB_ProcData.VB_Invoke_Property = ";Border"
ContainerBorderStyle = m_eContainerBorderStyle
End Property
Property Let ContainerBorderStyle(ByVal eBorderStyle As TraceBorderStyle)
m_eContainerBorderStyle = eBorderStyle
Call DrawControl
Call UserControl.Refresh
Call UserControl.PropertyChanged("ContainerBorderStyle")
End Property
'ShapeStyle
Public Property Get ContainerShapeStyle() As ShapeStyle
Attribute ContainerShapeStyle.VB_Description = "Gets/Sets the shape style"
Attribute ContainerShapeStyle.VB_ProcData.VB_Invoke_Property = ";Border"
ContainerShapeStyle = m_eContainerShapeStyle
End Property
Property Let ContainerShapeStyle(ByVal eShapeStyle As ShapeStyle)
m_eContainerShapeStyle = eShapeStyle
Call DrawControl
Call UserControl.Refresh
Call UserControl.PropertyChanged("ContainerShapeStyle")
End Property
'CornerRadius
Public Property Get ContainerCornerRadius() As Integer
Attribute ContainerCornerRadius.VB_Description = "Gets/Sets corner radius"
Attribute ContainerCornerRadius.VB_ProcData.VB_Invoke_Property = ";Border"
ContainerCornerRadius = m_iContainerCornerRadius
End Property
Property Let ContainerCornerRadius(ByVal iContainerCornerRadius As Integer)
m_iContainerCornerRadius = iContainerCornerRadius
Call DrawControl
Call UserControl.Refresh
Call UserControl.PropertyChanged("ContainerCornerRadius")
End Property
'ContainerPicture
Public Property Set ContainerPicture(NewIcon As StdPicture)
Set m_ContainerPicture = NewIcon
PropertyChanged "ContainerPicture"
Call UserControl.Refresh
Call DrawControl
End Property
Public Property Get ContainerPicture() As StdPicture
Attribute ContainerPicture.VB_Description = "Gets/Sets container picture"
Attribute ContainerPicture.VB_ProcData.VB_Invoke_Property = ";Container"
Set ContainerPicture = m_ContainerPicture
End Property
'ContainerPictureSize
Public Property Get ContainerPictureSize() As Integer
Attribute ContainerPictureSize.VB_Description = "Gets/Sets container picture size"
Attribute ContainerPictureSize.VB_ProcData.VB_Invoke_Property = ";Container"
ContainerPictureSize = m_ContainerPictureSize
End Property
Public Property Let ContainerPictureSize(ByVal NewIconSize As Integer)
m_ContainerPictureSize = NewIconSize
PropertyChanged "ContainerPictureSize"
Call UserControl.Refresh
Call DrawControl
End Property
'TopBufferSize
Public Property Get ContainerPictureBufferTop() As Integer
Attribute ContainerPictureBufferTop.VB_Description = "Gets/Sets container picture top padding"
Attribute ContainerPictureBufferTop.VB_ProcData.VB_Invoke_Property = ";Container"
ContainerPictureBufferTop = m_TopBuffer
End Property
Public Property Let ContainerPictureBufferTop(ByVal Size As Integer)
m_TopBuffer = Size
PropertyChanged "ContainerPictureBufferTop"
Call UserControl.Refresh
Call DrawControl
End Property
'LeftBufferSize
Public Property Get ContainerPictureBufferLeft() As Integer
Attribute ContainerPictureBufferLeft.VB_Description = "Gets/Sets container picture left padding"
Attribute ContainerPictureBufferLeft.VB_ProcData.VB_Invoke_Property = ";Container"
ContainerPictureBufferLeft = m_LeftBuffer
End Property
Public Property Let ContainerPictureBufferLeft(ByVal Size As Integer)
m_LeftBuffer = Size
PropertyChanged "ContainerPictureBufferLeft"
Call UserControl.Refresh
Call DrawControl
End Property
'
'
'#Divers
'UseCustonColors
Public Property Get UseCustomColors() As Boolean
Attribute UseCustomColors.VB_Description = "Use theme colors or custom colors"
Attribute UseCustomColors.VB_ProcData.VB_Invoke_Property = ";Basic"
UseCustomColors = m_UseCustomColors
End Property
Public Property Let UseCustomColors(ByVal New_UseCustomColors As Boolean)
m_UseCustomColors = New_UseCustomColors
PropertyChanged "UseCustomColors"
GetGradientColors
Call UserControl.Refresh
Call DrawControl
End Property
'Appearence
Public Property Get Appearence() As Theme
Attribute Appearence.VB_Description = "Sets theme colors of control"
Attribute Appearence.VB_ProcData.VB_Invoke_Property = ";Basic"
Appearence = m_enmTheme
End Property
Public Property Let Appearence(enmNewTheme As Theme)
m_enmTheme = enmNewTheme
Call UserControl.PropertyChanged("Appearence")
GetGradientColors
Call UserControl.Refresh
Call DrawControl
End Property
'Enable
Public Property Get Enabled() As Boolean
Attribute Enabled.VB_Description = "Gets/Sets if control is enabled"
Attribute Enabled.VB_ProcData.VB_Invoke_Property = ";Basic"
Enabled = m_bEnabled
End Property
Public Property Let Enabled(ByVal vNewValue As Boolean)
On Error Resume Next
m_bEnabled = vNewValue
Dim ctl As Control
For Each ctl In UserControl.ContainedControls
ctl.Enabled = m_bEnabled
Next
Call UserControl.Refresh
End Property
'State
Public Property Get Expandable() As Boolean
Attribute Expandable.VB_Description = "Is control expandable"
Attribute Expandable.VB_ProcData.VB_Invoke_Property = ";Basic"
Expandable = m_CanExpand
End Property
Public Property Let Expandable(ByVal New_State As Boolean)
m_CanExpand = New_State
If m_XPStyle = True Then m_CanExpand = False
State = eBarcollapsed
PropertyChanged "Expandable"
Call UserControl.Refresh
Call DrawControl
End Property
'CollapseButtonColor
Public Property Get CollapseButtonColor() As OLE_COLOR
Attribute CollapseButtonColor.VB_Description = "Gets/Sets collapse button color"
Attribute CollapseButtonColor.VB_ProcData.VB_Invoke_Property = ";Basic"
CollapseButtonColor = m_CollapseButtonColor
End Property
Public Property Let CollapseButtonColor(ByVal objCollapseButtonColor As OLE_COLOR)
m_CollapseButtonColor = objCollapseButtonColor
Call UserControl.PropertyChanged("CollapseButtonColor")
Call UserControl.Refresh
Call DrawControl
End Property
'backcolor
Public Property Get BackColor() As OLE_COLOR
Attribute BackColor.VB_Description = "Gets/Sets container back color"
Attribute BackColor.VB_ProcData.VB_Invoke_Property = ";Container"
BackColor = m_ebg
End Property
Public Property Let BackColor(ByVal objBackColor As OLE_COLOR)
m_ebg = objBackColor
Call UserControl.PropertyChanged("BackColor")
Call UserControl.Refresh
Call DrawControl
End Property
'
'
'Prod閐ures diverses et utiles
'definir le rectangle de chaque partie
Private Sub GetItemClientRect(tR As RECT, ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long)
SetRect tR, X1, Y1, X2, Y2
End Sub
'definir la zone r間ion de la fen阾re
Private Sub GetItemWindowReg(ByVal Region)
SetWindowRgn UserControl.hWnd, Region, True
End Sub
'fonction qui donne la taille des bars: header et Footer
Private Function ReadSizeBar(bar As String) As Long
Select Case bar
Case "Header"
Select Case m_iHeaderSize
Case Small
ReadSizeBar = 18
Case Medium
ReadSizeBar = 25
Case Large
ReadSizeBar = 40
End Select
Case "Footer"
Select Case m_iFooterSize
' Case Small
' ReadSizeBar = 12
Case eMedium
ReadSizeBar = 20
Case eLarge
ReadSizeBar = 34
End Select
End Select
End Function
Private Sub DrawControl()
Dim tR As RECT
Dim r As RECT
Dim tRB As tpAPI_RECT
Dim BorderStyle As Long
Dim lWinRgn As Long
Dim hPen As Long
Dim hPenOld As Long
Dim lRadius As Long
Dim lHeaderSize As Long
Dim lFooterSize As Long
With UserControl
BorderStyle = m_eContainerBorderStyle
lHeaderSize = ReadSizeBar("Header")
lFooterSize = ReadSizeBar("Footer")
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -