form1.frm
来自「vb精彩编程希望大家有用」· FRM 代码 · 共 155 行
FRM
155 行
VERSION 5.00
Begin VB.Form Form1
Caption = "调色器"
ClientHeight = 2865
ClientLeft = 60
ClientTop = 345
ClientWidth = 4320
LinkTopic = "Form1"
ScaleHeight = 2865
ScaleWidth = 4320
StartUpPosition = 3 '窗口缺省
Begin VB.HScrollBar HScroll3
Height = 255
LargeChange = 10
Left = 2160
Max = 255
TabIndex = 6
Top = 2160
Width = 1455
End
Begin VB.HScrollBar HScroll2
Height = 255
LargeChange = 10
Left = 2160
Max = 255
TabIndex = 5
Top = 1680
Width = 1455
End
Begin VB.HScrollBar HScroll1
Height = 255
LargeChange = 10
Left = 2160
Max = 255
TabIndex = 4
Top = 1200
Width = 1455
End
Begin VB.Label Label8
AutoSize = -1 'True
Caption = "兰"
Height = 180
Left = 3720
TabIndex = 10
Top = 2190
Width = 180
End
Begin VB.Label Label7
AutoSize = -1 'True
Caption = "绿"
Height = 180
Left = 3720
TabIndex = 9
Top = 1710
Width = 180
End
Begin VB.Label Label6
AutoSize = -1 'True
Caption = "红"
Height = 180
Left = 3720
TabIndex = 8
Top = 1230
Width = 180
End
Begin VB.Label Label5
AutoSize = -1 'True
Caption = "调 色 板"
BeginProperty Font
Name = "宋体"
Size = 18
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
Left = 1440
TabIndex = 7
Top = 240
Width = 1515
End
Begin VB.Label Label4
BackColor = &H00000000&
BorderStyle = 1 'Fixed Single
Height = 1215
Left = 480
TabIndex = 3
Top = 1200
Width = 975
End
Begin VB.Label Label3
BackColor = &H00000000&
BorderStyle = 1 'Fixed Single
Height = 255
Left = 1920
TabIndex = 2
Top = 2160
Width = 255
End
Begin VB.Label Label2
BackColor = &H00000000&
BorderStyle = 1 'Fixed Single
Height = 255
Left = 1920
TabIndex = 1
Top = 1680
Width = 255
End
Begin VB.Label Label1
BackColor = &H00000000&
BorderStyle = 1 'Fixed Single
Height = 255
Left = 1920
TabIndex = 0
Top = 1200
Width = 255
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim intR As Integer, intG As Integer, intB As Integer
Private Sub Form_Load()
intR = 0
intG = 0
intB = 0
Label1.BackColor = RGB(0, 0, 0) '红
Label2.BackColor = RGB(0, 0, 0) '绿
Label3.BackColor = RGB(0, 0, 0) '蓝
Label4.BackColor = RGB(0, 0, 0) '调和色
End Sub
Private Sub HScroll1_Change()
'红色
intR = HScroll1.Value
Label1.BackColor = RGB(intR, 0, 0)
Label4.BackColor = RGB(intR, intG, intB)
End Sub
Private Sub HScroll2_Change()
'绿色
intG = HScroll2.Value
Label2.BackColor = RGB(0, intG, 0)
Label4.BackColor = RGB(intR, intG, intB)
End Sub
Private Sub HScroll3_Change()
'兰色
intB = HScroll3.Value
Label3.BackColor = RGB(0, 0, intB)
Label4.BackColor = RGB(intR, intG, intB)
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?