📄 form9.frm
字号:
Else
num = num + 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31 + 30
End If
End If
num = num + Val(dday)
jfrq = num
hzzde.rsdaychart.Requery '使记录集重新定位
If Series = 1 Then '城市户
qhj = cchart(DataPoint, 2)
hzzde.rsdaychart.Filter = "交费日期=#" & jfrq & "#" & " and 类型='城市户'"
shou = hzzde.rsdaychart.Fields(2).Value
chu = hzzde.rsdaychart.Fields(3).Value
End If
If Series = 2 Then '农村户
qhj = cchart(DataPoint, 3)
hzzde.rsdaychart.Filter = "交费日期=#" & jfrq & "#" & " and 类型='农村户'"
shou = hzzde.rsdaychart.Fields(2).Value
chu = hzzde.rsdaychart.Fields(3).Value
End If
hzzde.rsdaychart.Filter = adFilterNone
Form9tip.Show
End If
End Sub
Private Sub MSChart1_SeriesSelected(Series As Integer, MouseFlags As Integer, Cancel As Integer)
If havechart Then
chen = 0: nong = 0: shou = 0: chu = 0
dyear = Text2.Text
dmonth = Text3.Text
dday = ""
If Series = 1 Then '城市户
qhj = Val(Label16.Caption)
shou = Val(Label14.Caption)
chu = Val(Label15.Caption)
End If
If Series = 2 Then '农村户
qhj = Val(Label17.Caption)
shou = Val(Label19.Caption)
chu = Val(Label18.Caption)
End If
Form9tip.Show
End If
End Sub
Private Sub MSHFlexGrid1_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
Toolbar1.Visible = False
Toolbar2.Visible = False
Toolbar3.Visible = False
Toolbar4.Visible = False
End Sub
Private Sub MSHFlexGrid2_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
Toolbar1.Visible = False
Toolbar2.Visible = False
Toolbar3.Visible = False
Toolbar4.Visible = False
End Sub
Private Sub StatusBar1_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
Toolbar1.Visible = False
Toolbar2.Visible = False
Toolbar3.Visible = False
Toolbar4.Visible = False
End Sub
Private Sub Text2_Change() '交费年
jfd = Text2.Text + "-" + Text3.Text + "-01"
If Text3.Text = "2" Then
If Val(Text2.Text) Mod 4 = 0 Then
jfx = Text2.Text + "-" + Text3.Text + "-29"
Else
jfx = Text2.Text + "-" + Text3.Text + "-28"
End If
End If
If (Text3.Text = "1" Or Text3.Text = "3" Or Text3.Text = "5" Or _
Text3.Text = "7" Or Text3.Text = "8" Or Text3.Text = "10" Or _
Text3.Text = "12") Then
jfx = Text2.Text + "-" + Text3.Text + "-31"
End If
If (Text3.Text = "4" Or _
Text3.Text = "6" Or Text3.Text = "9" Or _
Text3.Text = "11") Then
jfx = Text2.Text + "-" + Text3.Text + "-30"
End If
stjfd = " 交费日期在" + Text2.Text + "年" + Text3.Text + "月之内"
StatusBar1.SimpleText = "查询条件为:" + stjfd
Command1.Enabled = True
End Sub
Private Sub Text3_Change() '交费月
jfd = Text2.Text + "-" + Text3.Text + "-01"
If Text3.Text = "2" Then
If Val(Text2.Text) Mod 4 = 0 Then
jfx = Text2.Text + "-" + Text3.Text + "-29"
Else
jfx = Text2.Text + "-" + Text3.Text + "-28"
End If
End If
If (Text3.Text = "1" Or Text3.Text = "3" Or Text3.Text = "5" Or _
Text3.Text = "7" Or Text3.Text = "8" Or Text3.Text = "10" Or _
Text3.Text = "12") Then
jfx = Text2.Text + "-" + Text3.Text + "-31"
End If
If (Text3.Text = "4" Or _
Text3.Text = "6" Or Text3.Text = "9" Or _
Text3.Text = "11") Then
jfx = Text2.Text + "-" + Text3.Text + "-30"
End If
stjfd = " 交费日期在" + Text2.Text + "年" + Text3.Text + "月之内"
StatusBar1.SimpleText = "查询条件为:" + stjfd
Command1.Enabled = True
End Sub
Private Sub Timer1_Timer()
If actionflag = "expright" Then
If MSChart1.Left <= 0 Then
Timer1.Enabled = False
Else
MSChart1.Left = MSChart1.Left - 100
MSChart1.Width = MSChart1.Width + 100
End If
End If
If actionflag = "expleft" Then
If MSChart1.Left >= 4080 Then
Timer1.Enabled = False
Else
MSChart1.Left = MSChart1.Left + 100
MSChart1.Width = MSChart1.Width - 100
End If
End If
If actionflag = "rright" Then
MSChart1.Plot.View3d.Set MSChart1.Plot.View3d.Rotation - 20, MSChart1.Plot.View3d.Elevation
If mousestate = True Then
Timer1.Enabled = False
End If
End If
If actionflag = "rleft" Then
MSChart1.Plot.View3d.Set MSChart1.Plot.View3d.Rotation + 20, MSChart1.Plot.View3d.Elevation
If mousestate = True Then
Timer1.Enabled = False
End If
End If
If actionflag = "rup" Then
MSChart1.Plot.View3d.Set MSChart1.Plot.View3d.Rotation, MSChart1.Plot.View3d.Elevation - 10
If mousestate = True Then
Timer1.Enabled = False
End If
End If
If actionflag = "rdown" Then
MSChart1.Plot.View3d.Set MSChart1.Plot.View3d.Rotation, MSChart1.Plot.View3d.Elevation + 10
If mousestate = True Then
Timer1.Enabled = False
End If
End If
If actionflag = "turnh" Then
MSChart1.Plot.DepthToHeightRatio = MSChart1.Plot.DepthToHeightRatio + 0.05
If mousestate = True Then
Timer1.Enabled = False
End If
If MSChart1.Plot.DepthToHeightRatio >= 2 Then
Timer1.Enabled = False
End If
End If
If actionflag = "turnb" Then
MSChart1.Plot.DepthToHeightRatio = MSChart1.Plot.DepthToHeightRatio - 0.05
If mousestate = True Then
Timer1.Enabled = False
End If
End If
If actionflag = "loogen" Then
MSChart1.Plot.WidthToHeightRatio = MSChart1.Plot.WidthToHeightRatio + 0.05
If mousestate = True Then
Timer1.Enabled = False
End If
If MSChart1.Plot.WidthToHeightRatio >= 3 Then
Timer1.Enabled = False
End If
End If
If actionflag = "shorten" Then
MSChart1.Plot.WidthToHeightRatio = MSChart1.Plot.WidthToHeightRatio - 0.05
If mousestate = True Then
Timer1.Enabled = False
End If
End If
End Sub
Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
If Button.Index = 4 Then '二纬折线
MSChart1.ChartType = VtChChartType2dLine
End If
If Button.Index = 5 Then '二纬条形图
MSChart1.ChartType = VtChChartType2dBar
End If
If Button.Index = 6 Then '三纬折线
MSChart1.ChartType = VtChChartType3dLine
End If
If Button.Index = 7 Then '三纬柱状
MSChart1.ChartType = VtChChartType3dBar
End If
End Sub
Private Sub Toolbar1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
If Button = vbLeftButton Then
If x >= 0 And x <= 330 Then
actionflag = "expright"
Timer1.Enabled = True
Timer1.Interval = 100
End If
If x >= 345 And x <= 660 Then
actionflag = "expleft"
Timer1.Enabled = True
Timer1.Interval = 100
End If
End If
End Sub
Private Sub Toolbar1_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
If Button = vbLeftButton Then
If x >= 0 And x <= 330 Then
Timer1.Enabled = False
End If
If x >= 345 And x <= 660 Then
Timer1.Enabled = False
End If
End If
End Sub
Private Sub Toolbar2_ButtonClick(ByVal Button As MSComctlLib.Button)
If Button.Index = 1 Then
actionflag = "rright"
Timer1.Enabled = True
Timer1.Interval = 500
End If
If Button.Index = 3 Then
actionflag = "rleft"
Timer1.Enabled = True
Timer1.Interval = 500
End If
If Button.Index = 5 Then
actionflag = "turnh"
Timer1.Enabled = True
Timer1.Interval = 100
End If
If Button.Index = 6 Then
actionflag = "turnb"
Timer1.Enabled = True
Timer1.Interval = 100
End If
If Button.Index = 8 Then
actionflag = "loogen"
Timer1.Enabled = True
Timer1.Interval = 100
End If
If Button.Index = 9 Then
actionflag = "shorten"
Timer1.Enabled = True
Timer1.Interval = 100
End If
End Sub
Private Sub Toolbar2_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
If Button = vbLeftButton Then
If x >= 0 And x <= 330 Then
mousestate = False
actionflag = "rright"
Timer1.Enabled = True
Timer1.Interval = 500
End If
If x >= 690 And x <= 1020 Then
mousestate = False
actionflag = "rleft"
Timer1.Enabled = True
Timer1.Interval = 500
End If
If x >= 1170 And x <= 1485 Then
actionflag = "turnh"
mousestate = False
Timer1.Enabled = True
Timer1.Interval = 100
End If
If x >= 1490 And x <= 1830 Then
actionflag = "turnb"
mousestate = False
Timer1.Enabled = True
Timer1.Interval = 100
End If
If x >= 1965 And x <= 2295 Then
actionflag = "loogen"
mousestate = False
Timer1.Enabled = True
Timer1.Interval = 100
End If
If x >= 2310 And x <= 2640 Then
actionflag = "shorten"
mousestate = False
Timer1.Enabled = True
Timer1.Interval = 100
End If
End If
End Sub
Private Sub Toolbar2_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
If Button = vbLeftButton Then
If x >= 0 And x <= 330 Then
mousestate = True
Timer1.Enabled = False
End If
If x >= 690 And x <= 1020 Then
mousestate = True
Timer1.Enabled = False
End If
If x >= 1170 And x <= 1485 Then
mousestate = True
Timer1.Enabled = False
End If
If x >= 1490 And x <= 1830 Then
mousestate = True
Timer1.Enabled = False
End If
If x >= 1965 And x <= 2295 Then
mousestate = True
Timer1.Enabled = False
End If
If x >= 2310 And x <= 2640 Then
mousestate = True
Timer1.Enabled = False
End If
End If
End Sub
Private Sub Toolbar3_ButtonClick(ByVal Button As MSComctlLib.Button)
If Button.Index = 1 Then
actionflag = "rup"
Timer1.Enabled = True
Timer1.Interval = 250
End If
End Sub
Private Sub Toolbar3_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
If Button = vbLeftButton Then
If x >= 0 And x <= 330 Then
mousestate = False
actionflag = "rup"
Timer1.Enabled = True
Timer1.Interval = 250
End If
End If
End Sub
Private Sub Toolbar3_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
If Button = vbLeftButton Then
If x >= 0 And x <= 330 Then
mousestate = True
Timer1.Enabled = False
End If
End If
End Sub
Private Sub Toolbar4_ButtonClick(ByVal Button As MSComctlLib.Button)
If Button.Index = 1 Then
actionflag = "rdown"
Timer1.Enabled = True
Timer1.Interval = 250
End If
End Sub
Private Sub Toolbar4_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
If Button = vbLeftButton Then
If x >= 0 And x <= 330 Then
mousestate = False
actionflag = "rdown"
Timer1.Enabled = True
Timer1.Interval = 250
End If
End If
End Sub
Private Sub Toolbar4_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
If Button = vbLeftButton Then
If x >= 1 And x <= 330 Then
mousestate = True
Timer1.Enabled = False
End If
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -