📄 dotoptions.frm
字号:
VERSION 5.00
Begin VB.Form DotOptions
BorderStyle = 3 'Fixed Dialog
Caption = "Dot density theme Options"
ClientHeight = 2130
ClientLeft = 2835
ClientTop = 3645
ClientWidth = 3975
Icon = "DotOptions.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
PaletteMode = 1 'UseZOrder
ScaleHeight = 2130
ScaleWidth = 3975
ShowInTaskbar = 0 'False
Begin VB.CheckBox ckVisible
Caption = "Theme is &visible"
Height = 255
Left = 180
TabIndex = 4
Top = 1140
Width = 1695
End
Begin VB.ComboBox cmbSize
Height = 315
ItemData = "DotOptions.frx":000C
Left = 1380
List = "DotOptions.frx":0016
Style = 2 'Dropdown List
TabIndex = 3
Top = 600
Width = 1215
End
Begin VB.TextBox txtDataValue
Height = 315
Left = 1380
TabIndex = 1
Top = 120
Width = 1815
End
Begin VB.CommandButton cmdCancel
Cancel = -1 'True
Caption = "&Cancel"
Height = 375
Left = 2100
TabIndex = 5
Top = 1620
Width = 1215
End
Begin VB.CommandButton cmdOk
Caption = "&OK"
Default = -1 'True
Height = 375
Left = 660
TabIndex = 6
Top = 1620
Width = 1215
End
Begin VB.Label lblSize
Caption = "&Dot size:"
Height = 255
Left = 180
TabIndex = 2
Top = 660
Width = 1215
End
Begin VB.Label lblDataValue
Caption = "&Value per dot:"
Height = 255
Left = 180
TabIndex = 0
Top = 180
Width = 1155
End
End
Attribute VB_Name = "DotOptions"
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 DotValue As Double, DotSize As Integer, bVisible As Boolean
Public bOptionsSet As Boolean, bInitParams As Boolean
Dim gTheme As Theme, bTheme As Boolean
Private Sub InitDots()
txtDataValue.Text = DotValue
cmbSize.ListIndex = DotSize
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
DotSize = 1 ' Large
bVisible = True
bInitParams = True
End If
If Not IsMissing(tTheme) Then
Set gTheme = tTheme
bTheme = True
Else
bTheme = False
End If
InitDots
FormToCenter hWnd
Show 1
End Sub
Private Sub cmdOk_Click()
DotValue = txtDataValue.Text
DotSize = cmbSize.ListIndex
bVisible = (ckVisible.Value = 1)
bOptionsSet = True
If bTheme Then
gTheme.AutoRecompute = False
With gTheme.Properties
.ValuePerDot = DotValue
If DotSize = 0 Then
.DotSize = DotSizeConstants.miDotSizeSmall
Else
.DotSize = DotSizeConstants.miDotSizeLarge
End If
End With
gTheme.AutoRecompute = True
gTheme.Visible = bVisible
End If
Hide
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -