📄 选色板.frm
字号:
VERSION 5.00
Begin VB.Form Form1
ClientHeight = 3090
ClientLeft = 3375
ClientTop = 3450
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3090
ScaleWidth = 4680
Begin VB.CommandButton Command2
Caption = "退出"
Height = 255
Left = 2813
TabIndex = 18
Top = 2738
Width = 855
End
Begin VB.CommandButton Command1
Caption = "清除"
Height = 255
Left = 1013
TabIndex = 17
Top = 2738
Width = 855
End
Begin VB.PictureBox Picture2
Height = 495
Left = 833
ScaleHeight = 435
ScaleWidth = 2955
TabIndex = 16
Top = 2018
Width = 3015
End
Begin VB.PictureBox Picture1
Height = 375
Index = 12
Left = 473
ScaleHeight = 315
ScaleWidth = 555
TabIndex = 15
Top = 1538
Width = 615
End
Begin VB.PictureBox Picture1
Height = 375
Index = 8
Left = 473
ScaleHeight = 315
ScaleWidth = 555
TabIndex = 14
Top = 1058
Width = 615
End
Begin VB.PictureBox Picture1
Height = 375
Index = 4
Left = 473
ScaleHeight = 315
ScaleWidth = 555
TabIndex = 13
Top = 578
Width = 615
End
Begin VB.PictureBox Picture1
Height = 375
Index = 0
Left = 473
ScaleHeight = 315
ScaleWidth = 555
TabIndex = 12
Top = 98
Width = 615
End
Begin VB.PictureBox Picture1
Height = 375
Index = 15
Left = 3593
ScaleHeight = 315
ScaleWidth = 555
TabIndex = 11
Top = 1538
Width = 615
End
Begin VB.PictureBox Picture1
Height = 375
Index = 14
Left = 2553
ScaleHeight = 315
ScaleWidth = 555
TabIndex = 10
Top = 1538
Width = 615
End
Begin VB.PictureBox Picture1
Height = 375
Index = 13
Left = 1513
ScaleHeight = 315
ScaleWidth = 555
TabIndex = 9
Top = 1538
Width = 615
End
Begin VB.PictureBox Picture1
Height = 375
Index = 11
Left = 3593
ScaleHeight = 315
ScaleWidth = 555
TabIndex = 8
Top = 1058
Width = 615
End
Begin VB.PictureBox Picture1
Height = 375
Index = 10
Left = 2553
ScaleHeight = 315
ScaleWidth = 555
TabIndex = 7
Top = 1058
Width = 615
End
Begin VB.PictureBox Picture1
Height = 375
Index = 9
Left = 1513
ScaleHeight = 315
ScaleWidth = 555
TabIndex = 6
Top = 1058
Width = 615
End
Begin VB.PictureBox Picture1
Height = 375
Index = 7
Left = 3593
ScaleHeight = 315
ScaleWidth = 555
TabIndex = 5
Top = 578
Width = 615
End
Begin VB.PictureBox Picture1
Height = 375
Index = 6
Left = 2553
ScaleHeight = 315
ScaleWidth = 555
TabIndex = 4
Top = 578
Width = 615
End
Begin VB.PictureBox Picture1
Height = 375
Index = 5
Left = 1513
ScaleHeight = 315
ScaleWidth = 555
TabIndex = 3
Top = 578
Width = 615
End
Begin VB.PictureBox Picture1
Height = 375
Index = 3
Left = 3593
ScaleHeight = 315
ScaleWidth = 555
TabIndex = 2
Top = 98
Width = 615
End
Begin VB.PictureBox Picture1
Height = 375
Index = 2
Left = 2553
ScaleHeight = 315
ScaleWidth = 555
TabIndex = 1
Top = 98
Width = 615
End
Begin VB.PictureBox Picture1
Height = 375
Index = 1
Left = 1513
ScaleHeight = 315
ScaleWidth = 555
TabIndex = 0
Top = 98
Width = 615
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim i, j As Integer
Private Sub Command1_Click()
Picture2.BackColor = Form1.BackColor
End Sub
Private Sub Command2_Click()
End
End Sub
Private Sub Form_Paint()
i = 0: j = 0
Do While i < 16
Picture1(i).BackColor = RGB((i / 6) * 127, (j Mod 4) * 127, (i Mod 4) * 127)
j = j + 1
If j > 4 Then
j = 0
End If
i = i + 1
Loop
End Sub
Private Sub Picture1_Click(Index As Integer)
Picture2.BackColor = Picture1(Index).BackColor
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -