?? frmmain.frm
字號:
VERSION 5.00
Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.1#0"; "COMCTL32.OCX"
Object = "{00025600-0000-0000-C000-000000000046}#4.6#0"; "CRYSTL32.OCX"
Begin VB.MDIForm frmMain
BackColor = &H8000000C&
Caption = "大興電腦公司進銷存管理系統"
ClientHeight = 4320
ClientLeft = 165
ClientTop = 735
ClientWidth = 7545
Icon = "frmMain.frx":0000
LinkTopic = "MDIForm1"
ScrollBars = 0 'False
StartUpPosition = 3 'Windows Default
Begin Crystal.CrystalReport rpt1
Left = 30
Top = 3570
_ExtentX = 741
_ExtentY = 741
_Version = 262150
End
Begin ComctlLib.StatusBar sbStatusBar
Align = 2 'Align Bottom
Height = 315
Left = 0
TabIndex = 0
Top = 4005
Width = 7545
_ExtentX = 13309
_ExtentY = 556
SimpleText = ""
_Version = 327680
BeginProperty Panels {0713E89E-850A-101B-AFC0-4210102A8DA7}
NumPanels = 2
BeginProperty Panel1 {0713E89F-850A-101B-AFC0-4210102A8DA7}
Object.Width = 9596
MinWidth = 9596
TextSave = ""
Key = ""
Object.Tag = ""
EndProperty
BeginProperty Panel2 {0713E89F-850A-101B-AFC0-4210102A8DA7}
TextSave = ""
Key = ""
Object.Tag = ""
EndProperty
EndProperty
MouseIcon = "frmMain.frx":0442
End
Begin VB.Menu mnuDataBase
Caption = "數據庫(&D)"
Begin VB.Menu mnuLogon
Caption = "登錄(&L)"
Shortcut = ^L
End
Begin VB.Menu mnuBar1
Caption = "-"
End
Begin VB.Menu mnuDataManager
Caption = "數據管理(&D)"
Begin VB.Menu mnuBusinessman
Caption = "業務員數據表 (&B)"
End
Begin VB.Menu mnuCustomer
Caption = "客戶數據表 (&C)"
End
Begin VB.Menu mnuFactory
Caption = "廠商數據表 (&F)"
End
Begin VB.Menu mnuProduct
Caption = "商品數據表 (&P)"
End
Begin VB.Menu mnuProductInput
Caption = "進貨數據表 (&I)"
End
Begin VB.Menu mnuProductOutput
Caption = "銷售數據表 (&O)"
End
Begin VB.Menu mnuRetreat
Caption = "退貨數據表 (&R)"
End
Begin VB.Menu mnuStore
Caption = "庫存數據表 (&S)"
End
End
Begin VB.Menu mnuBar2
Caption = "-"
End
Begin VB.Menu mnuFileExit
Caption = "退出(&X)"
End
End
Begin VB.Menu mnuTrade
Caption = "交易管理(&T)"
Begin VB.Menu mnuInput
Caption = "進貨登記 (&I)"
End
Begin VB.Menu mnuOutput
Caption = "銷售登記 (&O)"
End
Begin VB.Menu mnuReturn
Caption = "退貨登記 (&R)"
End
End
Begin VB.Menu mnuStatistics
Caption = "統計(&S)"
Begin VB.Menu mnuIFO
Caption = "進貨交易金額 TOP TEN (&I)"
End
Begin VB.Menu mnuTCO
Caption = "顧客購買金額 TOP TEN (&T)"
End
Begin VB.Menu mnuPSO
Caption = "商品銷售量 TOP TEN (&P)"
End
Begin VB.Menu mnuCRO
Caption = "商品退貨量 TOP TEN (&R)"
End
Begin VB.Menu mnuBar5
Caption = "-"
End
Begin VB.Menu mnuBTO
Caption = "業務員業績 (&B)"
End
Begin VB.Menu mnuBS
Caption = "業務員月薪 (&S)"
End
End
Begin VB.Menu mnuReport
Caption = "報表(&R)"
Begin VB.Menu mnuTWSR
Caption = "本周銷售報表"
End
Begin VB.Menu mnuTMSR
Caption = "本月銷售報表"
End
Begin VB.Menu mnuBar4
Caption = "-"
End
Begin VB.Menu mnuLWSR
Caption = "過去7天銷售報表"
End
Begin VB.Menu mnuLMSR
Caption = "上月銷售報表"
End
Begin VB.Menu mnuHYSR
Caption = "上半年銷售報表"
End
End
Begin VB.Menu mnuWindow
Caption = "窗口(&W)"
WindowList = -1 'True
Begin VB.Menu mnuWindowCascade
Caption = "層疊(&C)"
End
Begin VB.Menu mnuWindowTileHorizontal
Caption = "橫向平鋪(&H)"
End
Begin VB.Menu mnuWindowTileVertical
Caption = "縱向平鋪(&V)"
End
Begin VB.Menu mnuWindowArrangeIcons
Caption = "排列圖標(&A)"
End
End
Begin VB.Menu mnuHelp
Caption = "幫助(&H)"
Begin VB.Menu mnuHelpAbout
Caption = "關于(&A)..."
End
End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub SetRPT() '顯示報表
rpt1.Destination = crptToWindow
rpt1.Action = 1
End Sub
Private Sub MDIForm_Load()
Me.Left = GetSetting(App.Title, "Settings", "MainLeft", 1000)
Me.Top = GetSetting(App.Title, "Settings", "MainTop", 1000)
Me.Width = GetSetting(App.Title, "Settings", "MainWidth", 6500)
Me.Height = GetSetting(App.Title, "Settings", "MainHeight", 6500)
mnuTrade.Enabled = False
mnuStatistics.Enabled = False
mnuReport.Enabled = False
mnuDataManager.Enabled = False
Me.Show
Login
rpt1.Connect = ConnectID
rpt1.ReportFileName = App.Path & "\SQLTest.rpt" '報表文件
End Sub
Private Sub MDIForm_Unload(Cancel As Integer)
If Me.WindowState <> vbMinimized Then
SaveSetting App.Title, "Settings", "MainLeft", Me.Left
SaveSetting App.Title, "Settings", "MainTop", Me.Top
SaveSetting App.Title, "Settings", "MainWidth", Me.Width
SaveSetting App.Title, "Settings", "MainHeight", Me.Height
End If
End Sub
Private Sub mnuBS_Click()
WhatToOrder = "BS"
frmOrder.Show vbModal
End Sub
Private Sub mnuBTO_Click()
WhatToOrder = "BTO"
frmOrder.Show vbModal
End Sub
Private Sub mnuBusinessman_Click()
CurrentTable = "Businessman"
BusinessmanTableOpened = True
EnableDMS
NewDataManager
End Sub
Private Sub mnuCRO_Click()
WhatToOrder = "CRO"
frmOrder.Show vbModal
End Sub
Private Sub mnuCustomer_Click()
CurrentTable = "Customer"
CustomerTableOpened = True
EnableDMS
NewDataManager
End Sub
Private Sub mnuFactory_Click()
CurrentTable = "Factory"
FactoryTableOpened = True
EnableDMS
NewDataManager
End Sub
Private Sub mnuFileExit_Click()
Unload Me
End Sub
Private Sub mnuHelpAbout_Click()
frmAbout.Show vbModal, Me
End Sub
Private Sub mnuHYSR_Click()
rpt1.SelectionFormula = "{output.o_date} in Calendar1stHalf"
SetRPT
End Sub
Private Sub mnuIFO_Click()
WhatToOrder = "IFO"
frmOrder.Show vbModal
End Sub
Private Sub mnuInput_Click()
frmInput.Show vbModal
End Sub
Private Sub mnuLMSR_Click()
rpt1.SelectionFormula = "{output.o_date} in LastFullMonth"
SetRPT
End Sub
Private Sub mnuLogon_Click()
Login
End Sub
Private Sub mnuLWSR_Click()
rpt1.SelectionFormula = "{output.o_date} in Last7Days"
SetRPT
End Sub
Private Sub mnuOutput_Click()
frmOutput.Show vbModal
End Sub
Private Sub mnuProduct_Click()
CurrentTable = "Product"
ProductTableOpened = True
EnableDMS
NewDataManager
End Sub
Private Sub mnuProductInput_Click()
CurrentTable = "Input"
InputTableOpened = True
EnableDMS
NewDataManager
End Sub
Private Sub mnuProductOutput_Click()
CurrentTable = "Output"
OutputTableOpened = True
EnableDMS
NewDataManager
End Sub
Private Sub mnuPSO_Click()
WhatToOrder = "PSO"
frmOrder.Show vbModal
End Sub
Private Sub mnuRetreat_Click()
CurrentTable = "Retreat"
RetreatTableOpened = True
EnableDMS
NewDataManager
End Sub
Private Sub mnuReturn_Click()
frmRetreat.Show vbModal
End Sub
Private Sub mnuStore_Click()
CurrentTable = "Store"
StoreTableOpened = True
EnableDMS
NewDataManager
End Sub
Private Sub mnuTCO_Click()
WhatToOrder = "TCO"
frmOrder.Show vbModal
End Sub
Private Sub mnuViewStatusBar_Click()
If mnuViewStatusBar.Checked Then
sbStatusBar.Visible = False
mnuViewStatusBar.Checked = False
Else
sbStatusBar.Visible = True
mnuViewStatusBar.Checked = True
End If
End Sub
Private Sub mnuViewToolbar_Click()
If mnuViewToolbar.Checked Then
tbToolBar.Visible = False
mnuViewToolbar.Checked = False
Else
tbToolBar.Visible = True
mnuViewToolbar.Checked = True
End If
End Sub
Private Sub mnuTMSR_Click()
rpt1.SelectionFormula = "{output.o_date} in MonthToDate"
SetRPT
End Sub
Private Sub mnuTWSR_Click()
rpt1.SelectionFormula = "{output.o_date} in WeekToDateFromSun "
SetRPT
End Sub
Private Sub mnuWindowArrangeIcons_Click()
Me.Arrange vbArrangeIcons
End Sub
Private Sub mnuWindowCascade_Click()
Me.Arrange vbCascade
End Sub
Private Sub mnuWindowTileHorizontal_Click()
Me.Arrange vbTileHorizontal
End Sub
Private Sub mnuWindowTileVertical_Click()
Me.Arrange vbTileVertical
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -