📄 gradoptions.frm
字号:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form GradOptions
BorderStyle = 3 'Fixed Dialog
Caption = "Graduated symbols theme Options"
ClientHeight = 2490
ClientLeft = 2850
ClientTop = 3615
ClientWidth = 4545
Icon = "GradOptions.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
PaletteMode = 1 'UseZOrder
ScaleHeight = 2490
ScaleWidth = 4545
ShowInTaskbar = 0 'False
Begin VB.CheckBox ckVisible
Caption = "Theme is &visible"
Height = 255
Left = 2280
TabIndex = 6
Top = 1320
Width = 1695
End
Begin VB.ComboBox cmbSize
Height = 315
ItemData = "GradOptions.frx":000C
Left = 2040
List = "GradOptions.frx":0028
TabIndex = 3
Top = 600
Width = 1215
End
Begin VB.PictureBox pctSymbolColor
BackColor = &H00000000&
ForeColor = &H00000000&
Height = 495
Left = 1320
ScaleHeight = 435
ScaleWidth = 495
TabIndex = 5
Top = 1200
Width = 555
End
Begin VB.TextBox txtDataValue
Height = 315
Left = 2040
TabIndex = 1
Top = 120
Width = 1815
End
Begin VB.CommandButton cmdCancel
Cancel = -1 'True
Caption = "&Cancel"
Height = 375
Left = 2340
TabIndex = 7
Top = 1920
Width = 1215
End
Begin VB.CommandButton cmdOk
Caption = "&OK"
Default = -1 'True
Height = 375
Left = 900
TabIndex = 8
Top = 1920
Width = 1215
End
Begin MSComDlg.CommonDialog dlgSymbolColor
Left = 3720
Top = 1860
_ExtentX = 847
_ExtentY = 847
_Version = 393216
Flags = 1
End
Begin VB.Label lblSymbolColor
Caption = "S&ymbol color:"
Height = 255
Left = 180
TabIndex = 4
Top = 1320
Width = 975
End
Begin VB.Label lblSize
Caption = "&Size of this symbol:"
Height = 255
Left = 180
TabIndex = 2
Top = 660
Width = 1515
End
Begin VB.Label lblDataValue
Caption = "&Value of largest symbol:"
Height = 255
Left = 180
TabIndex = 0
Top = 180
Width = 1755
End
End
Attribute VB_Name = "GradOptions"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
' This sample application and corresponding sample code is provided
' for example purposes only. It has not undergone rigorous testing
' and as such should not be shipped as part of a final application
' without extensive testing on the part of the organization releasing
' the end-user product.
Public GradValue As Double, GradSize As Single, GradColor As Long
Public bOptionsSet As Boolean, bInitParams As Boolean, bVisible As Boolean
Dim bTheme As Boolean, gTheme As Theme
Private Sub InitGradSymbs()
txtDataValue.Text = GradValue
cmbSize.Text = GradSize
pctSymbolColor.BackColor = GradColor
If bVisible Then
ckVisible.Value = 1
Else
ckVisible.Value = 0
End If
End Sub
Private Sub cmdCancel_Click()
Hide
End Sub
Public Sub Activate(Optional tTheme)
If Not bInitParams Then
GradSize = 18
bInitParams = True
bVisible = True
GradColor = 16711935
End If
If Not IsMissing(tTheme) Then
Set gTheme = tTheme
bTheme = True
Else
bTheme = False
End If
InitGradSymbs
FormToCenter hWnd
Show 1
End Sub
Private Sub cmdOk_Click()
GradValue = txtDataValue.Text
GradSize = cmbSize.Text
GradColor = pctSymbolColor.BackColor
bVisible = (ckVisible.Value = 1)
bOptionsSet = True
If bTheme Then
gTheme.AutoRecompute = False
With gTheme.Properties
.DataValue = GradValue
.SymbolStyle.SymbolFont.Size = GradSize
.SymbolStyle.SymbolFontColor = GradColor
End With
gTheme.AutoRecompute = True
gTheme.Visible = bVisible
End If
Hide
End Sub
Private Sub pctSymbolColor_Click()
dlgSymbolColor.Color = pctSymbolColor.BackColor
dlgSymbolColor.ShowColor
If Not dlgSymbolColor.CancelError Then
pctSymbolColor.BackColor = dlgSymbolColor.Color
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -