📄 baroptions.frm
字号:
VERSION 5.00
Begin VB.Form BarOptions
BorderStyle = 3 'Fixed Dialog
Caption = "Bar theme Options"
ClientHeight = 3345
ClientLeft = 2850
ClientTop = 3615
ClientWidth = 4545
Icon = "BarOptions.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
PaletteMode = 1 'UseZOrder
ScaleHeight = 3345
ScaleWidth = 4545
ShowInTaskbar = 0 'False
Begin VB.CheckBox ckVisible
Caption = "Theme is &visible"
Height = 255
Left = 180
TabIndex = 9
Top = 2220
Width = 1695
End
Begin VB.TextBox txtWidth
Height = 315
Left = 1800
TabIndex = 6
Top = 1080
Width = 1395
End
Begin VB.TextBox txtSize
Height = 315
Left = 1800
TabIndex = 3
Top = 600
Width = 1395
End
Begin VB.CheckBox ckIndependent
Caption = "Bars are scaled &Independently"
Height = 255
Left = 180
TabIndex = 8
Top = 1800
Width = 2895
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 = 2400
TabIndex = 10
Top = 2820
Width = 1215
End
Begin VB.CommandButton cmdOk
Caption = "&OK"
Default = -1 'True
Height = 375
Left = 960
TabIndex = 11
Top = 2820
Width = 1215
End
Begin VB.Label lblUnit2
Caption = "in."
Height = 255
Left = 3300
TabIndex = 7
Top = 1140
Width = 555
End
Begin VB.Label lblUnit1
Caption = "in."
Height = 255
Left = 3300
TabIndex = 4
Top = 660
Width = 555
End
Begin VB.Label lblWidth
Caption = "&Width of the bars:"
Height = 255
Left = 180
TabIndex = 5
Top = 1140
Width = 1515
End
Begin VB.Label lblSize
Caption = "&Size of this bar:"
Height = 255
Left = 180
TabIndex = 2
Top = 660
Width = 1515
End
Begin VB.Label lblDataValue
Caption = "&Value of largest bar:"
Height = 255
Left = 180
TabIndex = 0
Top = 180
Width = 1515
End
End
Attribute VB_Name = "BarOptions"
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 BarValue As Double, BarSize As Single, BarWidth As Single
Public bIndependent As Boolean, bVisible As Boolean
Public bOptionsSet As Boolean, bInitParams As Boolean
Dim gTheme As Theme, bTheme As Boolean
Private Sub InitBars()
txtDataValue.Text = BarValue
txtSize.Text = BarSize
txtWidth.Text = BarWidth
If bIndependent Then
ckIndependent.Value = 1
Else
ckIndependent.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
BarSize = 0.2
BarWidth = 0.2
Case miUnitCentimeter
BarSize = 0.5
BarWidth = 0.5
End Select
bIndependent = True
bInitParams = True
bVisible = True
End If
InitBars
If iPaperUnits = miUnitInch Then
lblUnit1.Caption = "in."
lblUnit2.Caption = "in."
Else
lblUnit1.Caption = "cm."
lblUnit2.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()
BarValue = txtDataValue.Text
BarSize = txtSize.Text
BarWidth = txtWidth.Text
bIndependent = (ckIndependent.Value = 1)
bVisible = (ckVisible.Value = 1)
bOptionsSet = True
If bTheme Then
gTheme.AutoRecompute = False
With gTheme.Properties
.DataValue = BarValue
.Size = BarSize
.Width = BarWidth
.Independent = bIndependent
End With
gTheme.AutoRecompute = True
gTheme.Visible = bVisible
End If
Hide
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -