📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form Form1
BackColor = &H80000005&
Caption = "Form1"
ClientHeight = 3870
ClientLeft = 60
ClientTop = 345
ClientWidth = 4680
LinkTopic = "Form1"
LockControls = -1 'True
ScaleHeight = 3870
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.HScrollBar HScroll1
Height = 255
Index = 2
LargeChange = 20
Left = 600
Max = 255
TabIndex = 4
Top = 1560
Width = 1815
End
Begin VB.HScrollBar HScroll1
Height = 255
Index = 1
LargeChange = 20
Left = 480
Max = 255
TabIndex = 3
Top = 960
Width = 1815
End
Begin VB.HScrollBar HScroll1
Height = 255
Index = 0
LargeChange = 20
Left = 480
Max = 255
TabIndex = 2
Top = 360
Width = 1815
End
Begin VB.CommandButton Command1
Caption = "退出"
Height = 495
Left = 3000
TabIndex = 1
Top = 2880
Width = 1095
End
Begin VB.CheckBox Check1
BackColor = &H80000005&
Caption = "从上至下"
Height = 375
Left = 480
TabIndex = 0
Top = 2760
Value = 1 'Checked
Width = 1215
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Sub bgcolor(lphdc As Object, r As Integer, g As Integer, b As Integer, d As Boolean)
Dim s, rr, topv, lefv, rigv, totv As Integer
s = (lphdc.Height / 60)
If d = True Then
topv = 0
Else
topv = lphdc.Height - s
End If
lefv = 0
rigv = lphdc.Width
totv = topv + s
For rr = 1 To 60
lphdc.Line (lefv, topv)-(rigv, totv), RGB(r, g, b), BF
r = r - 4
g = g - 4
b = b - 4
If r <= 0 Then
r = 0
End If
If g <= 0 Then
g = 0
End If
If b <= 0 Then
b = 0
End If
If d = True Then
topv = totv
Else
topv = topv - s
End If
totv = topv + s
Next
End Sub
Private Sub Check1_Click()
bgcolor Form1, HScroll1(0).Value, HScroll1(1).Value, HScroll1(2).Value, Check1.Value
End Sub
Private Sub Command1_Click()
End
End Sub
Private Sub Text1_keypress(Index As Integer, keyascii As Integer)
If keyascii = 13 Then
bgcolor Form1, HScroll1(0).Value, HScroll1(1).Value, HScroll1(2).Value, Check1.Value
End If
End Sub
Private Sub form_resize()
bgcolor Form1, HScroll1(0).Value, HScroll1(1).Value, HScroll1(2).Value, Check1.Value
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -