📄 resizer.ctl
字号:
'MappingInfo=UserControl,UserControl,-1,BorderStyle
Public Property Get BorderStyle() As BorderStyleConstants
BorderStyle = UserControl.BorderStyle
End Property
Public Property Let BorderStyle(ByVal New_BorderStyle As BorderStyleConstants)
UserControl.BorderStyle() = New_BorderStyle
PropertyChanged "BorderStyle"
End Property
'MemberInfo=0,0,0,false
Public Property Get InvertControls() As Boolean
InvertControls = m_InvertControls
End Property
Public Property Let InvertControls(ByVal New_InvertControls As Boolean)
m_InvertControls = New_InvertControls
PropertyChanged "InvertControls"
UserControl_Show
End Property
'MappingInfo=UserControl,UserControl,-1,BackColor
Public Property Get BackColor() As OLE_COLOR
BackColor = UserControl.BackColor
End Property
Public Property Let BackColor(ByVal New_BackColor As OLE_COLOR)
UserControl.BackColor() = New_BackColor
PropertyChanged "BackColor"
End Property
'MappingInfo=UserControl,UserControl,-1,Appearance
Public Property Get Appearance() As AppearanceConstants
Appearance = UserControl.Appearance
End Property
Public Property Let Appearance(ByVal New_Appearance As AppearanceConstants)
UserControl.Appearance() = New_Appearance
PropertyChanged "Appearance"
End Property
'MappingInfo=UserControl,UserControl,-1,Enabled
Public Property Get Enabled() As Boolean
Enabled = UserControl.Enabled
End Property
Public Property Let Enabled(ByVal New_Enabled As Boolean)
Dim c As Control
UserControl.Enabled() = New_Enabled
For Each c In UserControl.ContainedControls
c.Enabled = New_Enabled
Next
PropertyChanged "Enabled"
End Property
'MemberInfo=13,0,0,
Public Property Get ControlName1() As String
Dim c As Control
Dim cnt(0 To 1) As Control
Dim i As Integer
If m_InvertControls Then i = 1 Else i = 0
For Each c In UserControl.ContainedControls
If Not c Is lblResizer Then
Set cnt(i) = c
If m_InvertControls Then i = i - 1 Else i = i + 1
If i = 2 Or i = -1 Then Exit For
End If
Next
If Not cnt(0) Is Nothing Then
ControlName1 = cnt(0).Name
End If
End Property
Public Property Let ControlName1(ByVal New_ControlName1 As String)
Dim c As Control
Dim cnt(0 To 1) As Control
Dim i As Integer
If m_InvertControls Then i = 1 Else i = 0
For Each c In UserControl.ContainedControls
If Not c Is lblResizer Then
Set cnt(i) = c
If m_InvertControls Then i = i - 1 Else i = i + 1
If i = 2 Or i = -1 Then Exit For
End If
Next
If Not cnt(0) Is Nothing Then
cnt(0).Name = New_ControlName1
End If
PropertyChanged "ControlName1"
End Property
'MemberInfo=13,0,0,
Public Property Get ControlName2() As String
Dim c As Control
Dim cnt(0 To 1) As Control
Dim i As Integer
If m_InvertControls Then i = 1 Else i = 0
For Each c In UserControl.ContainedControls
If Not c Is lblResizer Then
Set cnt(i) = c
If m_InvertControls Then i = i - 1 Else i = i + 1
If i = 2 Or i = -1 Then Exit For
End If
Next
If Not cnt(1) Is Nothing Then
ControlName2 = cnt(1).Name
End If
End Property
Public Property Let ControlName2(ByVal New_ControlName2 As String)
Dim c As Control
Dim cnt(0 To 1) As Control
Dim i As Integer
If m_InvertControls Then i = 1 Else i = 0
For Each c In UserControl.ContainedControls
If Not c Is lblResizer Then
Set cnt(i) = c
If m_InvertControls Then i = i - 1 Else i = i + 1
If i = 2 Or i = -1 Then Exit For
End If
Next
If Not cnt(1) Is Nothing Then
cnt(1).Name = New_ControlName2
End If
PropertyChanged "ControlName2"
End Property
'MemberInfo=8,0,0,0
Public Property Get MinControlSize1() As Long
Dim i As Integer
If m_InvertControls Then i = 1 Else i = 0
MinControlSize1 = m_MinControlSize(i)
End Property
Public Property Let MinControlSize1(ByVal New_MinControlSize1 As Long)
Dim i As Integer
If m_InvertControls Then i = 1 Else i = 0
If New_MinControlSize1 >= 90 Then
m_MinControlSize(i) = New_MinControlSize1
End If
PropertyChanged "MinControlSize1"
End Property
'MemberInfo=8,0,0,0
Public Property Get MinControlSize2() As Long
Dim i As Integer
If m_InvertControls Then i = 0 Else i = 1
MinControlSize2 = m_MinControlSize(i)
End Property
Public Property Let MinControlSize2(ByVal New_MinControlSize2 As Long)
Dim i As Integer
If m_InvertControls Then i = 0 Else i = 1
If New_MinControlSize2 >= 90 Then
m_MinControlSize(i) = New_MinControlSize2
End If
PropertyChanged "MinControlSize2"
End Property
'MemberInfo=0,0,0,true
Public Property Get Control1Visible() As Boolean
Dim i As Integer
If m_InvertControls Then i = 1 Else i = 0
Control1Visible = m_ControlVisible(i)
End Property
Public Property Let Control1Visible(ByVal New_Control1Visible As Boolean)
Dim i As Integer
If m_InvertControls Then i = 1 Else i = 0
m_ControlVisible(i) = New_Control1Visible
If Not New_Control1Visible And Not m_ControlVisible(1 - i) Then
m_ControlVisible(1 - i) = True
PropertyChanged "Control2Visible"
End If
UserControl_Show
PropertyChanged "Control1Visible"
End Property
'MemberInfo=0,0,0,true
Public Property Get Control2Visible() As Boolean
Dim i As Integer
If m_InvertControls Then i = 0 Else i = 1
Control2Visible = m_ControlVisible(i)
End Property
Public Property Let Control2Visible(ByVal New_Control2Visible As Boolean)
Dim i As Integer
If m_InvertControls Then i = 0 Else i = 1
m_ControlVisible(i) = New_Control2Visible
If Not New_Control2Visible And Not m_ControlVisible(1 - i) Then
m_ControlVisible(1 - i) = True
PropertyChanged "Control1Visible"
End If
UserControl_Show
PropertyChanged "Control2Visible"
End Property
'MemberInfo=8,0,0,0
Public Property Get Control1Size() As Long
Dim c As Control
Dim cnt(0 To 1) As Control
Dim i As Integer
If m_InvertControls Then i = 1 Else i = 0
For Each c In UserControl.ContainedControls
If Not c Is lblResizer Then
Set cnt(i) = c
If m_InvertControls Then i = i - 1 Else i = i + 1
If i = 2 Or i = -1 Then Exit For
End If
Next
If Not cnt(0) Is Nothing Then
If m_Orientation = ccOrientationHorizontal Then
Control1Size = cnt(0).Height
Else
Control1Size = cnt(0).Width
End If
End If
End Property
Public Property Let Control1Size(ByVal New_Control1Size As Long)
Dim c As Control
Dim cnt(0 To 1) As Control
Dim i As Integer
If m_InvertControls Then i = 1 Else i = 0
For Each c In UserControl.ContainedControls
If Not c Is lblResizer Then
Set cnt(i) = c
If m_InvertControls Then i = i - 1 Else i = i + 1
If i = 2 Or i = -1 Then Exit For
End If
Next
If Not cnt(0) Is Nothing Then
If m_Orientation = ccOrientationHorizontal Then
If New_Control1Size < m_MinControlSize(0) Then
New_Control1Size = m_MinControlSize(0)
ElseIf New_Control1Size > Height - m_MinControlSize(0) Then
New_Control1Size = Height - m_MinControlSize(0)
End If
cnt(0).Height = New_Control1Size
cnt(1).Height = Height - New_Control1Size
Else
If New_Control1Size < m_MinControlSize(0) Then
New_Control1Size = m_MinControlSize(0)
ElseIf New_Control1Size > Width - m_MinControlSize(0) Then
New_Control1Size = Width - m_MinControlSize(0)
End If
cnt(0).Width = New_Control1Size
cnt(1).Width = Width - New_Control1Size
End If
End If
UserControl_Show
PropertyChanged "Control1Size"
End Property
'MemberInfo=8,0,0,0
Public Property Get Control2Size() As Long
Dim c As Control
Dim cnt(0 To 1) As Control
Dim i As Integer
If m_InvertControls Then i = 1 Else i = 0
For Each c In UserControl.ContainedControls
If Not c Is lblResizer Then
Set cnt(i) = c
If m_InvertControls Then i = i - 1 Else i = i + 1
If i = 2 Or i = -1 Then Exit For
End If
Next
If Not cnt(1) Is Nothing Then
If m_Orientation = ccOrientationHorizontal Then
Control2Size = cnt(1).Height
Else
Control2Size = cnt(1).Width
End If
End If
End Property
Public Property Let Control2Size(ByVal New_Control2Size As Long)
Dim c As Control
Dim cnt(0 To 1) As Control
Dim i As Integer
If m_InvertControls Then i = 1 Else i = 0
For Each c In UserControl.ContainedControls
If Not c Is lblResizer Then
Set cnt(i) = c
If m_InvertControls Then i = i - 1 Else i = i + 1
If i = 2 Or i = -1 Then Exit For
End If
Next
If Not cnt(1) Is Nothing Then
If m_Orientation = ccOrientationHorizontal Then
If New_Control2Size < m_MinControlSize(1) Then
New_Control2Size = m_MinControlSize(1)
ElseIf New_Control2Size > Height - m_MinControlSize(1) Then
New_Control2Size = Height - m_MinControlSize(1)
End If
cnt(1).Height = New_Control2Size
cnt(0).Height = Height - New_Control2Size
Else
If New_Control2Size < m_MinControlSize(1) Then
New_Control2Size = m_MinControlSize(1)
ElseIf New_Control2Size > Width - m_MinControlSize(1) Then
New_Control2Size = Width - m_MinControlSize(1)
End If
cnt(1).Width = New_Control2Size
cnt(0).Width = Width - New_Control2Size
End If
End If
UserControl_Show
PropertyChanged "Control2Size"
End Property
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -