📄 usercontrol1.ctl
字号:
VERSION 5.00
Begin VB.UserControl UserControl1
ClientHeight = 3600
ClientLeft = 0
ClientTop = 0
ClientWidth = 5610
ScaleHeight = 3600
ScaleWidth = 5610
Begin VB.PictureBox Picture1
Height = 735
Left = 518
ScaleHeight = 675
ScaleWidth = 4515
TabIndex = 3
Top = 2640
Width = 4575
End
Begin VB.HScrollBar HScroll3
Height = 135
Left = 840
Max = 255
TabIndex = 2
Top = 2160
Width = 2295
End
Begin VB.HScrollBar HScroll2
Height = 135
Left = 840
Max = 255
TabIndex = 1
Top = 1560
Width = 2295
End
Begin VB.HScrollBar HScroll1
Height = 135
Left = 840
Max = 255
TabIndex = 0
Top = 960
Width = 2295
End
Begin VB.Label Label13
Caption = "调 色 板"
BeginProperty Font
Name = "新宋体"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00800080&
Height = 255
Left = 2160
TabIndex = 16
Top = 0
Width = 1215
End
Begin VB.Line Line1
BorderColor = &H00C0C0FF&
X1 = 1920
X2 = 3600
Y1 = 360
Y2 = 360
End
Begin VB.Label Label12
Caption = "十六进制值"
ForeColor = &H00FF0000&
Height = 255
Left = 4440
TabIndex = 15
Top = 480
Width = 1095
End
Begin VB.Label Label11
Caption = "十进制值"
ForeColor = &H00FF0000&
Height = 255
Left = 3360
TabIndex = 14
Top = 480
Width = 735
End
Begin VB.Label Label10
Caption = "请拖动水平滚动条,改变R,G,B的值:"
ForeColor = &H00FF0000&
Height = 255
Left = 120
TabIndex = 13
Top = 480
Width = 3015
End
Begin VB.Label Label9
Height = 375
Left = 4560
TabIndex = 12
Top = 2160
Width = 855
End
Begin VB.Label Label8
Height = 375
Left = 4560
TabIndex = 11
Top = 1560
Width = 855
End
Begin VB.Label Label7
Height = 375
Left = 4560
TabIndex = 10
Top = 960
Width = 855
End
Begin VB.Label Label6
BackColor = &H00FFC0C0&
Caption = "B 值:"
Height = 255
Left = 120
TabIndex = 9
Top = 2040
Width = 615
End
Begin VB.Label Label5
BackColor = &H00FFC0C0&
Caption = "G 值:"
Height = 255
Left = 120
TabIndex = 8
Top = 1440
Width = 615
End
Begin VB.Label Label4
BackColor = &H00FFC0C0&
Caption = "R 值:"
Height = 255
Left = 120
TabIndex = 7
Top = 960
Width = 615
End
Begin VB.Label Label3
Height = 375
Left = 3360
TabIndex = 6
Top = 2160
Width = 855
End
Begin VB.Label Label2
Height = 375
Left = 3360
TabIndex = 5
Top = 1560
Width = 855
End
Begin VB.Label Label1
Height = 375
Left = 3360
TabIndex = 4
Top = 960
Width = 855
End
End
Attribute VB_Name = "UserControl1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Private Sub HScroll1_Change()
Picture1_Click
Label1_Click
Label7_Click
End Sub
Private Sub HScroll2_Change()
Picture1_Click
Label2_Click
Label8_Click
End Sub
Private Sub HScroll3_Change()
Picture1_Click
Label3_Click
Label9_Click
End Sub
Private Sub Label1_Click()
Label1.Caption = HScroll1.Value
End Sub
Private Sub Label2_Click()
Label2.Caption = HScroll2.Value
End Sub
Private Sub Label3_Click()
Label3.Caption = HScroll3.Value
End Sub
Private Sub Label7_Click()
Label7.Caption = Hex(Label1.Caption)
End Sub
Private Sub Label8_Click()
Label8.Caption = Hex(Label2.Caption)
End Sub
Private Sub Label9_Click()
Label9.Caption = Hex(Label3.Caption)
End Sub
Private Sub Picture1_Click()
r = HScroll1.Value
g = HScroll2.Value
b = HScroll3.Value
Picture1.BackColor = RGB(r, g, b)
End Sub
Private Sub UserControl_Resize()
'Enforce minimum dimensions
If UserControl.ScaleHeight < 3600 Then UserControl.Height = 3600
If UserControl.ScaleWidth < 5610 Then UserControl.Width = 5610
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -