📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form Form1
AutoRedraw = -1 'True
BorderStyle = 0 'None
Caption = "Form1"
ClientHeight = 3105
ClientLeft = 0
ClientTop = 0
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3105
ScaleWidth = 4680
ShowInTaskbar = 0 'False
StartUpPosition = 3 '窗口缺省
Begin VB.Timer Timer1
Interval = 10
Left = 0
Top = 240
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Height = 255
Left = 0
TabIndex = 0
Top = 0
Width = 1740
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim i As Integer, k As Integer
Dim x As Integer, y As Integer, z As Integer
Private Sub Form_DblClick()
End
End Sub
Private Sub Form_Load()
Form1.Top = 0
Form1.Left = 0
Form1.Height = Screen.Height
Form1.Width = Screen.Width
End Sub
Private Sub Timer1_Timer()
Cls
If i >= 0 And i < 255 Then
Select Case k
Case 0
x = 255
y = i
z = 0
Case 1
x = 255 - i
y = 255
z = 0
Case 2
x = 0
y = 255
z = i
Case 3
x = 0
y = 255 - i
z = 255
Case 4
x = i
y = 0
z = 255
Case 5
x = 255
y = 0
z = 255 - i
End Select
Label1.Caption = "RGB(" & x & "," & y & "," & z & ")"
Form1.BackColor = RGB(x, y, z)
i = i + 1
Else
i = 0
If k = 5 Then
k = 0
Else
k = k + 1
End If
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -