📄 color.frm
字号:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form color1
BorderStyle = 1 'Fixed Single
Caption = "颜色设置"
ClientHeight = 1740
ClientLeft = 4590
ClientTop = 1800
ClientWidth = 2610
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1740
ScaleWidth = 2610
StartUpPosition = 1 '所有者中心
Begin MSComDlg.CommonDialog CommonDialog1
Left = 60
Top = 1230
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin VB.CommandButton Command1
Caption = "确 定"
Height = 330
Left = 1395
TabIndex = 7
Top = 1305
Width = 1065
End
Begin VB.Frame Frame3
Caption = "颜色设置"
Height = 1080
Left = 120
TabIndex = 0
Top = 90
Width = 2355
Begin VB.PictureBox Picture3
AutoRedraw = -1 'True
FillColor = &H00FFFFFF&
Height = 300
Left = 240
ScaleHeight = 300
ScaleMode = 0 'User
ScaleWidth = 300
TabIndex = 3
Top = 480
Width = 300
End
Begin VB.PictureBox Picture4
AutoRedraw = -1 'True
Height = 300
Left = 915
ScaleHeight = 300
ScaleMode = 0 'User
ScaleWidth = 228.571
TabIndex = 2
Top = 465
Width = 300
End
Begin VB.PictureBox Picture5
AutoRedraw = -1 'True
Height = 300
Left = 1635
ScaleHeight = 300
ScaleMode = 0 'User
ScaleWidth = 300
TabIndex = 1
Top = 465
Width = 300
End
Begin VB.Label Label9
Caption = "背景"
Height = 375
Left = 240
TabIndex = 6
Top = 240
Width = 495
End
Begin VB.Label Label10
Caption = "坐标轴"
Height = 375
Left = 840
TabIndex = 5
Top = 240
Width = 735
End
Begin VB.Label Label11
Caption = "图像"
Height = 255
Left = 1635
TabIndex = 4
Top = 225
Width = 615
End
End
End
Attribute VB_Name = "color1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Unload color1
End Sub
Private Sub Form_Load()
Open "c:\hs.ini" For Input As #1
Input #1, zuox, zuoy, jingdu, beijing, zuo, tx, cx
Close #1
Picture3.Line (0, 0)-(300, 300), beijing, BF
Picture4.Line (0, 0)-(300, 300), zuo, BF
Picture5.Line (0, 0)-(300, 300), tx, BF
End Sub
Private Sub Picture3_Click()
Dim X, zuox, zuoy, jingdu, beijing, zuotx, cuxi
CommonDialog1.Action = 3
Open "c:\hs.ini" For Input As #1
Input #1, zuox, zuoy, jingdu, beijing, zuo, tx, cuxi
Close #1
beijing = CommonDialog1.color
Open "c:\hs.ini" For Output As #1
Write #1, zuox, zuoy, jingdu, beijing, zuo, tx, cuxi
Close #1
End Sub
Private Sub Picture4_Click()
Dim X, zuox, zuoy, jingdu, beijing, zuotx, cuxi
CommonDialog1.Action = 3
Open "c:\hs.ini" For Input As #1
Input #1, zuox, zuoy, jingdu, beijing, zuo, tx, cuxi
Close #1
zuo = CommonDialog1.color
Open "c:\hs.ini" For Output As #1
Write #1, zuox, zuoy, jingdu, beijing, zuo, tx, cuxi
Close #1
Picture1.AutoRedraw = True
Picture1.Line (0, 0)-(5000, 5000), beijing, BF
Picture1.Line (0, 2500)-(5000, 2500), zuo
Picture1.Line (2500, 0)-(2500, 5000), zuo
Picture1.Line (5000, 2500)-(4900, 2400), zuo
Picture1.Line (5000, 2500)-(4900, 2610), zuo
Picture1.Line (2500, 0)-(2400, 100), zuo
Picture1.Line (2500, 0)-(2620, 100), zuo
For X = 2500 To 5000 Step zuox
Picture1.Line (X, 2470)-(X, 2500), zuo
Next X
For X = 2500 To 0 Step -1 * zuox
Picture1.Line (X, 2470)-(X, 2500), zuo
Next X
For X = 2500 To 5000 Step zuoy
Picture1.Line (2500, X)-(2550, X), zuo
Next X
For X = 2500 To 0 Step -1 * zuoy
Picture1.Line (2500, X)-(2550, X), zuo
Next X
Picture1.AutoRedraw = False
Picture4.Line (0, 0)-(300, 300), zuo, BF
End Sub
Private Sub Picture5_Click()
Dim X, zuox, zuoy, jingdu, beijing, zuotx, cuxi
CommonDialog1.Action = 3
Open "c:\hs.ini" For Input As #1
Input #1, zuox, zuoy, jingdu, beijing, zuo, tx, cuxi
Close #1
tx = CommonDialog1.color
Open "c:\hs.ini" For Output As #1
Write #1, zuox, zuoy, jingdu, beijing, zuo, tx, cuxi
Close #1
Picture5.Line (0, 0)-(300, 300), tx, BF
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -