📄 frmmain.frm
字号:
BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":CA54
Key = "warn"
EndProperty
BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":CDEE
Key = "setting"
EndProperty
BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":D108
Key = "lstView"
EndProperty
BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":D422
Key = "exit"
EndProperty
EndProperty
End
Begin MSComctlLib.ImageList imlViewSIcon
Left = 8880
Top = 720
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 16
ImageHeight = 16
MaskColor = 12632256
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 7
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":136BC
Key = "group"
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":139D6
Key = "sboy"
EndProperty
BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":13CF0
Key = "group2"
EndProperty
BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":164A2
Key = "boy"
EndProperty
BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":168F4
Key = "girl"
EndProperty
BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":16D46
Key = "sboy2"
EndProperty
BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":1719A
Key = "sgirl"
EndProperty
EndProperty
End
Begin MSComctlLib.Toolbar tbToolBar
Align = 1 'Align Top
Height = 360
Left = 0
TabIndex = 6
Top = 0
Visible = 0 'False
Width = 9840
_ExtentX = 17357
_ExtentY = 635
ButtonWidth = 1349
ButtonHeight = 582
Wrappable = 0 'False
Appearance = 1
Style = 1
TextAlignment = 1
_Version = 393216
BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
NumButtons = 11
BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "类型"
Key = "tbnClientType"
Style = 5
BeginProperty ButtonMenus {66833FEC-8583-11D1-B16A-00C0F0283628}
NumButtonMenus = 3
BeginProperty ButtonMenu1 {66833FEE-8583-11D1-B16A-00C0F0283628}
Key = "tbnAddClientType"
Text = "添加客户类型"
EndProperty
BeginProperty ButtonMenu2 {66833FEE-8583-11D1-B16A-00C0F0283628}
Key = "tbnModifyClientType"
Text = "修改客户类型"
EndProperty
BeginProperty ButtonMenu3 {66833FEE-8583-11D1-B16A-00C0F0283628}
Key = "tbnDelClientType"
Text = "删除客户类型"
EndProperty
EndProperty
EndProperty
BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "tbnAddClient"
EndProperty
BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "进货"
Key = "tbnModifyClient"
EndProperty
BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "销售"
Key = "tbnDelClient"
EndProperty
BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "库存"
Key = "tbnClientInfo"
EndProperty
BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "报损"
Key = "tbnSearchClient"
EndProperty
BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "显示"
Key = "tbnViewStyle"
Style = 5
BeginProperty ButtonMenus {66833FEC-8583-11D1-B16A-00C0F0283628}
NumButtonMenus = 4
BeginProperty ButtonMenu1 {66833FEE-8583-11D1-B16A-00C0F0283628}
Key = "大图标"
Text = "大图标"
EndProperty
BeginProperty ButtonMenu2 {66833FEE-8583-11D1-B16A-00C0F0283628}
Key = "小图标"
Text = "小图标"
EndProperty
BeginProperty ButtonMenu3 {66833FEE-8583-11D1-B16A-00C0F0283628}
Key = "列表"
Text = "列表"
EndProperty
BeginProperty ButtonMenu4 {66833FEE-8583-11D1-B16A-00C0F0283628}
Key = "详细资料"
Object.Tag = "1"
Text = "详细资料"
EndProperty
EndProperty
EndProperty
BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button11 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "退出"
Key = "tbnExit"
EndProperty
EndProperty
End
Begin VB.Image imgSplitter
Height = 4788
Left = 1965
MousePointer = 9 'Size W E
Top = 705
Width = 150
End
Begin VB.Menu mnuSystem
Caption = "系统"
Begin VB.Menu mnuSystemUser
Caption = "用户管理"
End
Begin VB.Menu mnuSystemExit
Caption = "退出"
End
End
Begin VB.Menu mnuView
Caption = "1000"
Begin VB.Menu mnuViewToolbar
Caption = "1001"
Checked = -1 'True
End
Begin VB.Menu mnuViewStatusBar
Caption = "1002"
Checked = -1 'True
End
Begin VB.Menu mnuViewBar0
Caption = "-"
End
Begin VB.Menu mnuListViewMode
Caption = "1003"
Index = 0
End
Begin VB.Menu mnuListViewMode
Caption = "1004"
Index = 1
End
Begin VB.Menu mnuListViewMode
Caption = "1005"
Index = 2
End
Begin VB.Menu mnuListViewMode
Caption = "1006"
Index = 3
End
Begin VB.Menu mnuViewBar1
Caption = "-"
End
Begin VB.Menu mnuViewArrangeIcons
Caption = "1007"
End
Begin VB.Menu mnuViewBar2
Caption = "-"
End
Begin VB.Menu mnuViewRefresh
Caption = "1008"
End
End
Begin VB.Menu mnuMType
Caption = "商品类型管理"
Begin VB.Menu mnuMTypeAdd
Caption = "添加商品类型"
End
Begin VB.Menu mnuMTypeModify
Caption = "修改商品类型"
End
Begin VB.Menu mnuMTypeDel
Caption = "删除商品类型"
End
End
Begin VB.Menu mnuMerch
Caption = "商品管理"
Begin VB.Menu mnuMerchAdd
Caption = "添加商品"
End
Begin VB.Menu mnuMerchModify
Caption = "修改商品信息"
End
Begin VB.Menu mnuMerchDel
Caption = "删除商品信息"
End
End
Begin VB.Menu mnuBuy
Caption = "进货管理"
Begin VB.Menu mnuBuyAdd
Caption = "登记进货信息"
End
Begin VB.Menu mnuBuyModify
Caption = "修改进货信息"
End
Begin VB.Menu mnuBuyDel
Caption = "删除进货信息"
End
End
Begin VB.Menu mnuSell
Caption = "销售管理"
Begin VB.Menu mnuSellAdd
Caption = "登记销售表"
End
Begin VB.Menu mnuSellModify
Caption = "修改销售记录"
End
Begin VB.Menu mnuSellDel
Caption = "删除销售信息"
End
End
Begin VB.Menu mnuDispose
Caption = "报损管理"
Begin VB.Menu mnuDisposeAdd
Caption = "登记报损"
End
Begin VB.Menu mnuDisposeModify
Caption = "修改报损记录"
End
Begin VB.Menu mnuDisposeDel
Caption = "删除报损记录"
End
End
Begin VB.Menu mnuProvider
Caption = "供货商管理"
Begin VB.Menu mnuProviderAdd
Caption = "添加供货商"
End
Begin VB.Menu mnuProviderModify
Caption = "修改供货商"
End
Begin VB.Menu mnuProviderDel
Caption = "删除供货商"
End
End
Begin VB.Menu mnuAnalysis
Caption = "销售分析"
End
Begin VB.Menu mnuHelp
Caption = "1009"
Begin VB.Menu mnuHelpAbout
Caption = "1010"
End
End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Const NAME_COLUMN = 0
Const TYPE_COLUMN = 1
Const SIZE_COLUMN = 2
Const DATE_COLUMN = 3
Dim mbMoving As Boolean
Const sglSplitLimit = 500
Private Sub Form_Load()
LoadResStrings Me
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)
lvMerch.View = Val(GetSetting(App.Title, "Settings", "ViewMode", "0"))
'初始化数据
Call InitMain
End Sub
Private Sub Form_Unload(Cancel As Integer)
Dim i As Integer
'close all sub forms
For i = Forms.Count - 1 To 1 Step -1
Unload Forms(i)
Next
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
SaveSetting App.Title, "Settings", "ViewMode", lvMerch.View
End Sub
Private Sub Form_Resize()
On Error Resume Next
If Me.Width < 3000 Then Me.Width = 3000
SizeControls imgSplitter.Left
End Sub
Private Sub imgSplitter_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
With imgSplitter
picSplitter.Move .Left, .Top, .Width \ 2, .Height - 20
End With
picSplitter.Visible = True
mbMoving = True
End Sub
Private Sub imgSplitter_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
Dim sglPos As Single
If mbMoving Then
sglPos = x + imgSplitter.Left
If sglPos < sglSplitLimit Then
picSplitter.Left = sglSplitLimit
ElseIf sglPos > Me.Width - sglSplitLimit Then
picSplitter.Left = Me.Width - sglSplitLimit
Else
picSplitter.Left = sglPos
End If
End If
End Sub
Private Sub imgSplitter_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
SizeControls picSplitter.Left
picSplitter.Visible = False
mbMoving = False
End Sub
Private Sub TreeView1_DragDrop(Source As Control, x As Single, y As Single)
If Source = imgSplitter Then
SizeControls x
End If
End Sub
Sub SizeControls(x As Single)
On Error Resume Next
'设置 Width 属性
If x < 1500 Then x = 1500
If x > (Me.Width - 1500) Then x = Me.Width - 1500
tvTreeView.Width = x
imgSplitter.Left = x
sstabView.Left = x + 40
sstabView.Width = Me.Width - (tvTreeView.Width + 140)
lblTitle(0).Width = tvTreeView.Width
' lblTitle(1).Left = lvMerch.Left + 20
' lblTitle(1).Width = lvMerch.Width - 40
'设置 Top 属性
If tbToolBar.Visible Then
tvTreeView.Top = tbToolBar.Height + picTitles.Height
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -