📄 frmmain.frm
字号:
VERSION 5.00
Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0"; "COMCTL32.OCX"
Object = "{00025600-0000-0000-C000-000000000046}#4.6#0"; "CRYSTL32.OCX"
Begin VB.MDIForm frmMain
BackColor = &H8000000C&
Caption = "进销存管理系统"
ClientHeight = 4905
ClientLeft = 165
ClientTop = 735
ClientWidth = 7005
Icon = "frmMain.frx":0000
LinkTopic = "MDIForm1"
Picture = "frmMain.frx":030A
ScrollBars = 0 'False
StartUpPosition = 3 '窗口缺省
Begin Crystal.CrystalReport rpt1
Left = 1440
Top = 3600
_ExtentX = 741
_ExtentY = 741
_Version = 262150
End
Begin ComctlLib.StatusBar sbStatusBar
Align = 2 'Align Bottom
Height = 315
Left = 0
TabIndex = 0
Top = 4590
Width = 7005
_ExtentX = 12356
_ExtentY = 556
SimpleText = ""
_Version = 327682
BeginProperty Panels {0713E89E-850A-101B-AFC0-4210102A8DA7}
NumPanels = 6
BeginProperty Panel1 {0713E89F-850A-101B-AFC0-4210102A8DA7}
Object.Width = 6068
MinWidth = 6068
TextSave = ""
Object.Tag = ""
EndProperty
BeginProperty Panel2 {0713E89F-850A-101B-AFC0-4210102A8DA7}
TextSave = ""
Object.Tag = ""
EndProperty
BeginProperty Panel3 {0713E89F-850A-101B-AFC0-4210102A8DA7}
TextSave = ""
Object.Tag = ""
EndProperty
BeginProperty Panel4 {0713E89F-850A-101B-AFC0-4210102A8DA7}
TextSave = ""
Object.Tag = ""
EndProperty
BeginProperty Panel5 {0713E89F-850A-101B-AFC0-4210102A8DA7}
Style = 2
Alignment = 1
TextSave = "NUM"
Object.Tag = ""
EndProperty
BeginProperty Panel6 {0713E89F-850A-101B-AFC0-4210102A8DA7}
TextSave = ""
Object.Tag = ""
EndProperty
EndProperty
MousePointer = 13
OLEDropMode = 1
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 + -