?? frm_ystat.frm
字號(hào):
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{65E121D4-0C60-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCHRT20.OCX"
Begin VB.Form Frm_YStat
BorderStyle = 1 'Fixed Single
Caption = "出入庫(kù)現(xiàn)金年統(tǒng)計(jì)數(shù)據(jù)"
ClientHeight = 6270
ClientLeft = 45
ClientTop = 330
ClientWidth = 11880
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 6270
ScaleWidth = 11880
StartUpPosition = 3 '窗口缺省
Begin VB.Frame Frame1
Height = 5805
Left = 70
TabIndex = 3
Top = 0
Width = 11760
Begin MSChart20Lib.MSChart MSChart1
Height = 5565
Left = 75
OleObjectBlob = "Frm_YStat.frx":0000
TabIndex = 4
Top = 195
Width = 11520
End
End
Begin VB.OptionButton Option1
Caption = "條型顯示"
Height = 345
Left = 7920
TabIndex = 2
Top = 5895
Width = 1260
End
Begin VB.OptionButton Option2
Caption = "線形顯示"
Height = 345
Left = 9330
TabIndex = 1
Top = 5895
Width = 1260
End
Begin VB.CommandButton Command1
Caption = "取消"
Height = 345
Left = 10800
TabIndex = 0
Top = 5865
Width = 1050
End
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = 345
Top = 6525
Visible = 0 'False
Width = 2025
_ExtentX = 3572
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
End
Attribute VB_Name = "Frm_YStat"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim i As Integer
Private Sub Command1_Click()
Unload Me
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
rtn = SetWindowPos(Me.hwnd, -1, 0, 0, 0, 0, 3) '運(yùn)用API函數(shù)SetWindowPos,來(lái)實(shí)現(xiàn)使窗體置前的功能
Me.Left = (Screen.Width - Me.Width) / 2
Me.Top = (Screen.Height - Me.Height) / 2
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\db_kcgl.mdb;Persist Security Info=False"
Adodc1.RecordSource = "select * from tb_YMoney"
Adodc1.Refresh
Call LoadNumO '調(diào)用顯示圖表中的數(shù)據(jù)的過(guò)程
End Sub
Private Sub Option1_Click()
MSChart1.chartType = VtChChartType2dBar '使圖表中的數(shù)據(jù)條型顯示
End Sub
Private Sub Option2_Click()
MSChart1.chartType = VtChChartType2dLine '使圖表中的數(shù)據(jù)線形顯示
End Sub
'*** 自定義在圖表中顯示數(shù)據(jù)的過(guò)程 ***
Private Sub LoadNumO()
Dim j As Integer
Dim Nums As Integer
On Error Resume Next
Adodc1.RecordSource = "select * from tb_YMoney order by id"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
Adodc1.Recordset.MoveFirst
Nums = Adodc1.Recordset.RecordCount
ReDim arrValues(1 To Nums, 1 To 2) '定義動(dòng)態(tài)數(shù)組
For j = 1 To Nums '給數(shù)組賦值
arrValues(j, 1) = " " & Adodc1.Recordset!Dates
arrValues(j, 2) = Adodc1.Recordset!Moneys
Adodc1.Recordset.MoveNext
Next j
MSChart1.ChartData = arrValues '圖表顯示數(shù)據(jù)
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
frm_main.Enabled = True
End Sub
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -