📄 form0409.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "文本框颜色"
ClientHeight = 3525
ClientLeft = 60
ClientTop = 450
ClientWidth = 5235
LinkTopic = "Form1"
ScaleHeight = 3525
ScaleWidth = 5235
StartUpPosition = 3 '窗口缺省
Begin VB.HScrollBar HScroll3
Height = 495
Left = 1920
Max = 255
TabIndex = 7
Top = 2640
Width = 2895
End
Begin VB.HScrollBar HScroll2
Height = 495
Left = 1920
Max = 255
TabIndex = 6
Top = 1800
Width = 2895
End
Begin VB.TextBox Text1
Height = 495
Left = 2040
TabIndex = 1
Top = 240
Width = 2655
End
Begin VB.HScrollBar HScroll1
Height = 495
Left = 1920
Max = 255
TabIndex = 0
Top = 960
Width = 2895
End
Begin VB.Label Label4
Caption = "蓝色 = 0"
Height = 375
Left = 600
TabIndex = 5
Top = 2640
Width = 975
End
Begin VB.Label Label3
Caption = "绿色 = 0"
Height = 375
Left = 600
TabIndex = 4
Top = 1920
Width = 855
End
Begin VB.Label Label2
Caption = "红色 = 0"
Height = 375
Left = 600
TabIndex = 3
Top = 1080
Width = 855
End
Begin VB.Label Label1
Caption = "改变文本框颜色"
Height = 375
Left = 360
TabIndex = 2
Top = 240
Width = 1455
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub HScroll1_Change()
'改变红色滚动条
Text1.BackColor = RGB(HScroll1.Value, HScroll2.Value, HScroll3.Value)
Label2.Caption = "红色 = " & HScroll1.Value
End Sub
Private Sub HScroll2_Change()
'改变绿色滚动条
Text1.BackColor = RGB(HScroll1.Value, HScroll2.Value, HScroll3.Value)
Label3.Caption = "绿色 = " & HScroll2.Value
End Sub
Private Sub HScroll3_Change()
'改变蓝色滚动条
Text1.BackColor = RGB(HScroll1.Value, HScroll2.Value, HScroll3.Value)
Label4.Caption = "蓝色 = " & HScroll3.Value
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -