📄 frmwizard.frm
字号:
Height = 225
Index = 6
Left = 2340
TabIndex = 21
Tag = "7"
Top = 210
Width = 855
End
Begin VB.CheckBox chkMonth
Caption = "六 月"
Height = 225
Index = 5
Left = 1260
TabIndex = 20
Tag = "6"
Top = 810
Width = 855
End
Begin VB.CheckBox chkMonth
Caption = "五 月"
Height = 225
Index = 4
Left = 1260
TabIndex = 19
Tag = "5"
Top = 510
Width = 855
End
Begin VB.CheckBox chkMonth
Caption = "四 月"
Height = 225
Index = 3
Left = 1260
TabIndex = 18
Tag = "4"
Top = 225
Width = 855
End
Begin VB.CheckBox chkMonth
Caption = "三 月"
Height = 225
Index = 2
Left = 180
TabIndex = 17
Tag = "3"
Top = 795
Width = 855
End
Begin VB.CheckBox chkMonth
Caption = "二 月"
Height = 225
Index = 1
Left = 180
TabIndex = 16
Tag = "2"
Top = 510
Width = 855
End
Begin VB.CheckBox chkMonth
Caption = "一 月"
Height = 225
Index = 0
Left = 180
TabIndex = 15
Tag = "1"
Top = 210
Width = 855
End
End
Begin VB.Label lbl
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "第二步:"
BeginProperty Font
Name = "楷体_GB2312"
Size = 18
Charset = 134
Weight = 700
Underline = 0 'False
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
Height = 360
Index = 3
Left = 2160
TabIndex = 14
Top = 360
Width = 1515
End
Begin VB.Label lbl
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "请选择要抽取的月份"
BeginProperty Font
Name = "宋体"
Size = 21.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
Height = 435
Index = 2
Left = 2310
TabIndex = 13
Top = 960
Width = 3915
End
Begin VB.Image imgStep
BorderStyle = 1 'Fixed Single
Height = 3450
Index = 1
Left = 150
Picture = "frmWizard.frx":D53F
Stretch = -1 'True
Top = 210
Width = 1800
End
End
Begin VB.PictureBox pbStep
BorderStyle = 0 'None
Height = 3735
Index = 3
Left = 0
ScaleHeight = 249
ScaleMode = 3 'Pixel
ScaleWidth = 495
TabIndex = 30
Top = 0
Width = 7425
Begin VB.TextBox txtSummary
BackColor = &H00C0C0C0&
Height = 1965
Left = 2790
Locked = -1 'True
MultiLine = -1 'True
TabIndex = 44
Text = "frmWizard.frx":161FD
Top = 1050
Width = 3945
End
Begin VB.Label lbl
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "总结:"
BeginProperty Font
Name = "楷体_GB2312"
Size = 18
Charset = 134
Weight = 700
Underline = 0 'False
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
Height = 360
Index = 6
Left = 2160
TabIndex = 31
Top = 360
Width = 1140
End
Begin VB.Image imgStep
BorderStyle = 1 'Fixed Single
Height = 3450
Index = 3
Left = 150
Picture = "frmWizard.frx":16203
Stretch = -1 'True
Top = 210
Width = 1800
End
End
Begin VB.Line ln
BorderColor = &H80000010&
Index = 1
X1 = 165
X2 = 7070
Y1 = 3840
Y2 = 3840
End
Begin VB.Line ln
BorderColor = &H80000014&
Index = 0
X1 = 165
X2 = 7070
Y1 = 3870
Y2 = 3870
End
End
Attribute VB_Name = "frmWizard"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim sFinalSummary As String
Dim lStepRec As Long
Const cntlFirstStep As Long = 0
Const cntlLastStep As Long = 3
'******************************************************
'*自定义函数
'******************************************************
Function AllChecked() As Boolean
Dim l As Long, i As Long
For l = 0 To 11
If chkMonth(l).Value = vbChecked Then i = i + 1
Next
AllChecked = IIf(i >= 12, True, False)
End Function
Function AllChecked1() As Boolean
Dim l As Long, i As Long
For l = 0 To 2
If chkModify(l).Value = vbChecked Then i = i + 1
Next
AllChecked1 = IIf(i >= 3, True, False)
End Function
Sub ChkInit()
Dim l As Long, i As Long
i = 1
For l = 1 To 12
chkMonth(l - 1).Value = IIf(frmMain.lvData.ListItems(l).Checked, vbChecked, vbUnchecked)
If chkMonth(l - 1).Value = vbChecked Then
i = i + 1
End If
Next
chkMonth(12).Value = IIf(i >= 12, vbChecked, vbUnchecked)
For l = 1 To 3
chkModify(l).Value = vbChecked
Next
End Sub
Sub CheckStep()
cmdNext.ZOrder 0
Select Case lStepRec
Case cntlFirstStep
cmdBack.Enabled = False
cmdFinish.Enabled = False
cmdNext.Enabled = True
Case cntlLastStep
cmdNext.Enabled = False
cmdBack.Enabled = True
cmdFinish.Enabled = True
cmdFinish.SetFocus
cmdFinish.ZOrder 0
Case Else
cmdNext.Enabled = True
cmdBack.Enabled = True
cmdFinish.Enabled = False
End Select
End Sub
Sub CheckOpt()
Exit Sub
If optView(0).Value = False Then
optChartType(5).Enabled = False
Else
optChartType(5).Enabled = True
End If
End Sub
Sub MakeSummary() '月份+数据类型+视图类型+图表类型
Dim lPlus As Long, l As Long
Dim v As Variant
sFinalSummary = "您选择了 "
If AllChecked Then
sFinalSummary = sFinalSummary + "全年的"
Else
For Each v In chkMonth
If v.Value = vbChecked Then
sFinalSummary = sFinalSummary + v.Caption + "、"
End If
If v.Index = 11 Then
If Right(sFinalSummary, 1) = "、" Then sFinalSummary = Left(sFinalSummary, Len(sFinalSummary) - 1) + "的"
End If
Next
End If
If AllChecked1 Then
sFinalSummary = sFinalSummary + "全部数据"
Else
For Each v In chkModify
If v.Value = vbChecked Then
If v.Index = 3 Then
sFinalSummary = sFinalSummary + v.Caption
Else
sFinalSummary = sFinalSummary + v.Caption + "、"
End If
End If
Next
sFinalSummary = Left(sFinalSummary, Len(sFinalSummary) - 1)
End If
''If optModify(3).Value = True Then
'' sFinalSummary = sFinalSummary + "所有数据"
''Else
'For Each v In optModify
' If v.Value = True Then
' sFinalSummary = sFinalSummary + v.Caption
' Exit For
' End If
'Next
''End If
For Each v In optView
If v.Value = True Then
sFinalSummary = sFinalSummary + " ,本程序将据此生成" + v.Caption
Exit For
End If
Next
If optView(0).Value = True Then
lPlus = 0
Else
lPlus = 1
End If
For Each v In optChartType
If v.Value = True Then
sFinalSummary = sFinalSummary + v.Caption
pblCharType = Val(v.Tag) - lPlus
Exit For
End If
Next
txtSummary.Text = sFinalSummary
End Sub
'******************************************************
'*窗体函数
'******************************************************
Private Sub chkModify_Click(Index As Integer)
Dim l As Long, lv As Long
With chkModify(Index)
If Index = 3 Then
If chkModify(3).Value = vbChecked Then
lv = vbChecked
For l = 0 To 3
chkModify(l).Value = lv
Next
chkModify(3).Value = vbUnchecked
End If
End If
If .Value = vbChecked Then
.Tag = "1"
Else
.Tag = "0"
End If
End With
End Sub
Private Sub chkMonth_Click(Index As Integer)
Dim l As Long, lv As Long
With chkMonth(Index)
If Index = 12 Then
If chkMonth(12).Value = vbChecked Then
lv = vbChecked
For l = 0 To 11
chkMonth(l).Value = lv
Next
chkMonth(12).Value = vbUnchecked
End If
End If
If .Value = vbUnchecked Then chkMonth(12).Value = vbUnchecked
If .Value = vbChecked Then
.Tag = "1"
Else
.Tag = "0"
End If
End With
End Sub
Private Sub cmdBack_Click()
On Error Resume Next
lStepRec = lStepRec - 1
pbStep(lStepRec).ZOrder 0
If lStepRec < cntlFirstStep Then lStepRec = cntlFirstStep
CheckStep
CheckOpt
End Sub
Private Sub cmdCancel_Click()
Me.Hide
End Sub
Private Sub cmdFinish_Click()
Me.Hide
frmDiagram.Show vbModal
End Sub
Private Sub cmdNext_Click()
On Error Resume Next
lStepRec = lStepRec + 1
pbStep(lStepRec).ZOrder 0
If lStepRec > cntlLastStep Then lStepRec = cntlLastStep
CheckStep
CheckOpt
If lStepRec = cntlLastStep Then
MakeSummary
End If
End Sub
Private Sub Form_Activate()
lStepRec = cntlFirstStep
pbStep(cntlFirstStep).ZOrder 0
CheckStep
ChkInit
End Sub
Private Sub optChartType_Click(Index As Integer)
CheckOpt
End Sub
Private Sub optView_Click(Index As Integer)
CheckOpt
If Index = 1 Then
pbfIs3D = True
Else
pbfIs3D = False
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -