📄 pieoptions.frm
字号:
VERSION 5.00
Begin VB.Form PieOptions
BorderStyle = 3 'Fixed Dialog
Caption = "Pie theme Options"
ClientHeight = 2490
ClientLeft = 2850
ClientTop = 3615
ClientWidth = 4545
Icon = "PieOptions.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 = 2340
TabIndex = 6
Top = 1320
Width = 1695
End
Begin VB.TextBox txtSize
Height = 315
Left = 1800
TabIndex = 3
Top = 600
Width = 1395
End
Begin VB.CheckBox ckGraduated
Caption = "Pies are &Graduated"
Height = 255
Left = 180
TabIndex = 5
Top = 1320
Width = 1875
End
Begin VB.TextBox txtDataValue
Height = 315
Left = 1800
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 VB.Label lblUnit1
Caption = "in."
Height = 255
Left = 3300
TabIndex = 4
Top = 660
Width = 555
End
Begin VB.Label lblSize
Caption = "&Size of this pie:"
Height = 255
Left = 180
TabIndex = 2
Top = 660
Width = 1515
End
Begin VB.Label lblDataValue
Caption = "&Value of largest pie:"
Height = 255
Left = 180
TabIndex = 0
Top = 180
Width = 1515
End
End
Attribute VB_Name = "PieOptions"
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 PieValue As Double, PieSize As Single
Public bGraduated As Boolean, bVisible As Boolean
Public bOptionsSet As Boolean, bInitParams As Boolean
Dim gTheme As Theme, bTheme As Boolean
Private Sub InitPies()
txtDataValue.Text = PieValue
txtSize.Text = PieSize
If bGraduated Then
ckGraduated.Value = 1
Else
ckGraduated.Value = 0
End If
If bVisible Then
ckVisible.Value = 1
Else
ckVisible.Value = 0
End If
End Sub
Private Sub cmdCancel_Click()
Hide
End Sub
Public Sub Activate(ByVal iPaperUnits As Integer, Optional tTheme)
If Not bInitParams Then
Select Case iPaperUnits
Case miUnitInch
PieSize = 0.2
Case miUnitCentimeter
PieSize = 0.5
End Select
bGraduated = True
bVisible = True
bInitParams = True
End If
InitPies
If iPaperUnits = miUnitInch Then
lblUnit1.Caption = "in."
Else
lblUnit1.Caption = "cm."
End If
If Not IsMissing(tTheme) Then
Set gTheme = tTheme
bTheme = True
Else
bTheme = False
End If
FormToCenter hWnd
Show 1
End Sub
Private Sub cmdOk_Click()
PieValue = txtDataValue.Text
PieSize = txtSize.Text
bGraduated = (ckGraduated.Value = 1)
bVisible = (ckVisible.Value = 1)
bOptionsSet = True
If bTheme Then
gTheme.AutoRecompute = False
With gTheme.Properties
.DataValue = PieValue
.Size = PieSize
.Graduated = bGraduated
End With
gTheme.AutoRecompute = True
gTheme.Visible = bVisible
End If
Hide
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -