📄 flat.frm
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form frmColor
Caption = "Fig. 11.41: FlatScrollBars"
ClientHeight = 2820
ClientLeft = 6210
ClientTop = 3435
ClientWidth = 3495
LinkTopic = "Form1"
ScaleHeight = 2820
ScaleWidth = 3495
Begin VB.Frame fraStyle
Caption = "FlatScrollbar Style"
Height = 1215
Left = 360
TabIndex = 1
Top = 1440
Width = 2775
Begin VB.OptionButton optOption
Caption = "2D track 3D"
Height = 375
Index = 2
Left = 840
TabIndex = 4
Top = 720
Width = 1215
End
Begin VB.OptionButton optOption
Caption = "Flat"
Height = 255
Index = 1
Left = 1680
TabIndex = 3
Top = 360
Value = -1 'True
Width = 975
End
Begin VB.OptionButton optOption
Caption = "3D"
Height = 255
Index = 0
Left = 480
TabIndex = 2
Top = 360
Width = 975
End
End
Begin VB.PictureBox picColor
Enabled = 0 'False
Height = 975
Left = 2160
ScaleHeight = 915
ScaleWidth = 915
TabIndex = 0
Top = 240
Width = 975
End
Begin MSComCtl2.FlatScrollBar fsbScroll
Height = 240
Index = 2
Left = 360
TabIndex = 5
Top = 960
Width = 1575
_ExtentX = 2778
_ExtentY = 423
_Version = 393216
Arrows = 65536
Orientation = 1179649
End
Begin MSComCtl2.FlatScrollBar fsbScroll
Height = 240
Index = 1
Left = 360
TabIndex = 6
Top = 600
Width = 1575
_ExtentX = 2778
_ExtentY = 423
_Version = 393216
Arrows = 65536
Orientation = 1179649
End
Begin MSComCtl2.FlatScrollBar fsbScroll
Height = 240
Index = 0
Left = 360
TabIndex = 7
Top = 240
Width = 1575
_ExtentX = 2778
_ExtentY = 423
_Version = 393216
Arrows = 65536
Orientation = 1179649
End
End
Attribute VB_Name = "frmColor"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
' Fig. 11.41
' Demonstrating FlatScrollBars
Option Explicit ' General Declaration
Private Sub Form_Load()
Dim x As Integer
For x = fsbScroll.LBound To fsbScroll.UBound
With fsbScroll(x)
.Min = 0 ' Minimum value
.Max = 255 ' Maximum value
.LargeChange = 10 ' Large change value
.SmallChange = 1 ' Small change value
End With
Next x
End Sub
Private Sub fsbScroll_Change(Index As Integer)
Dim c(2) As Integer, x As Integer
' Read value of each FlatScrollBar into array
For x = LBound(c) To UBound(c)
c(x) = fsbScroll(x).Value
Next x
picColor.BackColor = RGB(c(0), c(1), c(2))
End Sub
Private Sub optOption_Click(Index As Integer)
Dim x As Integer
' Change appearance of FlatScrollBars
For x = optOption.LBound To optOption.UBound
fsbScroll(x).Appearance = Index
Next x
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -