资源名称:ERPSYS.zip [点击查看]
上传用户:zhpu1995
上传日期:2013-09-06
资源大小:61151k
文件大小:49k
源码类别:
企业管理
开发平台:
Visual Basic
- VERSION 5.00
- Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
- Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
- Begin VB.Form Xt_Control
- Caption = "桌面"
- ClientHeight = 5850
- ClientLeft = 675
- ClientTop = 1665
- ClientWidth = 9240
- Icon = "系统_主操作桌面.frx":0000
- LinkTopic = "Form1"
- MDIChild = -1 'True
- ScaleHeight = 5850
- ScaleWidth = 9240
- WindowState = 2 'Maximized
- Begin VB.PictureBox picSplitter
- BackColor = &H00808080&
- BorderStyle = 0 'None
- FillColor = &H00808080&
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 4800
- Left = 4740
- ScaleHeight = 2090.126
- ScaleMode = 0 'User
- ScaleWidth = 780
- TabIndex = 0
- Top = 780
- Visible = 0 'False
- Width = 72
- End
- Begin MSComctlLib.ImageList ImageList1
- Left = 5220
- Top = 2340
- _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 = "系统_主操作桌面.frx":1042
- Key = "stb"
- EndProperty
- BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "系统_主操作桌面.frx":2094
- Key = "xttb"
- EndProperty
- BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "系统_主操作桌面.frx":30E6
- Key = "gnqx"
- EndProperty
- BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "系统_主操作桌面.frx":3480
- Key = "szk"
- EndProperty
- BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "系统_主操作桌面.frx":381A
- Key = "gnqx1"
- EndProperty
- BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "系统_主操作桌面.frx":3C6C
- Key = "kpgl2"
- EndProperty
- BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "系统_主操作桌面.frx":4546
- Key = "kpgl"
- EndProperty
- EndProperty
- End
- Begin MSComctlLib.ListView lvListView
- Height = 3375
- Left = 2175
- TabIndex = 5
- Top = 705
- Width = 2295
- _ExtentX = 4048
- _ExtentY = 5953
- Arrange = 2
- LabelEdit = 1
- LabelWrap = -1 'True
- HideSelection = -1 'True
- OLEDragMode = 1
- OLEDropMode = 1
- PictureAlignment= 1
- _Version = 393217
- Icons = "ImageList2"
- SmallIcons = "ImageList1"
- ColHdrIcons = "ImageList1"
- ForeColor = -2147483640
- BackColor = -2147483643
- BorderStyle = 1
- Appearance = 1
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "宋体"
- Size = 9
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- OLEDragMode = 1
- OLEDropMode = 1
- NumItems = 0
- End
- Begin VB.PictureBox picTitles
- Align = 1 'Align Top
- Appearance = 0 'Flat
- BorderStyle = 0 'None
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H80000008&
- Height = 300
- Left = 0
- ScaleHeight = 300
- ScaleWidth = 9240
- TabIndex = 1
- TabStop = 0 'False
- Top = 420
- Width = 9240
- Begin VB.Label lblTitle
- BorderStyle = 1 'Fixed Single
- Caption = "百利/ERP"
- Height = 270
- Index = 0
- Left = 0
- TabIndex = 3
- Tag = " 树形视图:"
- Top = 12
- Width = 2016
- End
- Begin VB.Label lblTitle
- BorderStyle = 1 'Fixed Single
- Caption = " 列表视图:"
- Height = 270
- Index = 1
- Left = 2078
- TabIndex = 2
- Tag = " 列表视图:"
- Top = 12
- Width = 3216
- End
- End
- Begin MSComDlg.CommonDialog dlgCommonDialog
- Left = 3360
- Top = 2160
- _ExtentX = 847
- _ExtentY = 847
- _Version = 393216
- End
- Begin MSComctlLib.TreeView tvTreeView
- Height = 4800
- Left = 0
- TabIndex = 4
- Top = 705
- Width = 2010
- _ExtentX = 3545
- _ExtentY = 8467
- _Version = 393217
- Indentation = 564
- Style = 7
- ImageList = "ImageList1"
- Appearance = 1
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "宋体"
- Size = 9
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- End
- Begin MSComctlLib.Toolbar tbToolBar
- Align = 1 'Align Top
- Height = 420
- Left = 0
- TabIndex = 6
- Top = 0
- Width = 9240
- _ExtentX = 16298
- _ExtentY = 741
- ButtonWidth = 609
- ButtonHeight = 582
- AllowCustomize = 0 'False
- Appearance = 1
- ImageList = "imlToolbarIcons"
- _Version = 393216
- BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
- NumButtons = 10
- BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Style = 3
- EndProperty
- BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Key = "返回"
- Object.ToolTipText = "返回"
- ImageKey = "xq"
- EndProperty
- BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Key = "向前"
- Object.ToolTipText = "向前"
- ImageKey = "xh"
- EndProperty
- BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Style = 3
- EndProperty
- BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Style = 3
- EndProperty
- BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Style = 3
- EndProperty
- BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Key = "大图标"
- Object.ToolTipText = "大图标"
- ImageKey = "dtb"
- Style = 2
- Value = 1
- EndProperty
- BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Key = "小图标"
- Object.ToolTipText = "小图标"
- ImageKey = "xtb"
- Style = 2
- EndProperty
- BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Key = "列表"
- Object.ToolTipText = "列表"
- ImageKey = "lb"
- Style = 2
- EndProperty
- BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628}
- Key = "详细资料"
- Object.ToolTipText = "详细资料"
- ImageKey = "xxzl"
- Style = 2
- EndProperty
- EndProperty
- End
- Begin MSComctlLib.ImageList imlToolbarIcons
- Left = 4710
- Top = 840
- _ExtentX = 1005
- _ExtentY = 1005
- BackColor = -2147483643
- ImageWidth = 16
- ImageHeight = 16
- MaskColor = 12632256
- _Version = 393216
- BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
- NumListImages = 6
- BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "系统_主操作桌面.frx":5598
- Key = "xq"
- EndProperty
- BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "系统_主操作桌面.frx":5932
- Key = "xh"
- EndProperty
- BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "系统_主操作桌面.frx":5CCC
- Key = "dtb"
- EndProperty
- BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "系统_主操作桌面.frx":6066
- Key = "xtb"
- EndProperty
- BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "系统_主操作桌面.frx":6400
- Key = "lb"
- EndProperty
- BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "系统_主操作桌面.frx":679A
- Key = "xxzl"
- EndProperty
- EndProperty
- End
- Begin MSComctlLib.ImageList ImageList2
- Left = 6210
- Top = 2370
- _ExtentX = 1005
- _ExtentY = 1005
- BackColor = -2147483643
- ImageWidth = 32
- ImageHeight = 32
- MaskColor = 12632256
- _Version = 393216
- BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
- NumListImages = 4
- BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "系统_主操作桌面.frx":6B34
- Key = "y1"
- EndProperty
- BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "系统_主操作桌面.frx":6F88
- Key = ""
- EndProperty
- BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "系统_主操作桌面.frx":72A8
- Key = "i"
- EndProperty
- BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "系统_主操作桌面.frx":82FA
- Key = "y"
- EndProperty
- EndProperty
- End
- Begin VB.Image imgSplitter
- Height = 4785
- Left = 4230
- MousePointer = 9 'Size W E
- Top = 750
- Width = 150
- End
- End
- Attribute VB_Name = "Xt_Control"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- '***********************************************
- '* 模 块 名 称 :系统主操作桌面
- '* 功 能 描 述 :
- '* 程序员姓名 :李建伟
- '* 最后修改人 :李建伟
- '* 最后修改时间:2001/06/21
- '* 备 注:封版
- '***********************************************
- Const NAME_COLUMN = 0
- Const TYPE_COLUMN = 1
- Const SIZE_COLUMN = 2
- Const DATE_COLUMN = 3
- Private Declare Function OSWinHelp% Lib "user32" Alias "WinHelpA" (ByVal hwnd&, ByVal HelpFile$, ByVal wCommand%, dwData As Any)
- Dim mbMoving As Boolean
- Const sglSplitLimit = 1000
- Dim nodX As Node
- Dim mitem As ListItem
- Dim Ztxxrec As New ADODB.Recordset '帐套信息动态集
- Dim Xtgnbrec As New ADODB.Recordset '系统功能表
- Dim Xtqxxzrec As New ADODB.Recordset '系统权限限制动态集
- Dim Tsxx As String '系统提示信息
- Dim gnsyte As String '系统功能项索引
- Dim Xtrlrec As New ADODB.Recordset '系统日历动态集
- Dim Ctsfscdr As Boolean '窗体是否首次读入
- Private Sub lvListView_DblClick() '点击ListView执行相应功能
- If lvListView.ListItems.count > 0 Then
- Set Xtgnbrec = Cw_DataEnvi.DataConnect.Execute("SELECT * FROM xt_xtgnb where gnbm='" + Mid(Trim(lvListView.SelectedItem.Key), 2, Len(Trim(lvListView.SelectedItem.Key)) - 1) + "'")
- If Not Xtgnbrec.EOF Then
- If Xtgnbrec.Fields("mjbz") = True Then
- gnsyte = Trim(Xtgnbrec.Fields("gnsy"))
- Call Zxxymk(gnsyte)
- Else
- '---------------
- Dim Ssql As String
- sjgnbmStr = ""
- lvListView.ColumnHeaders.Clear
- lvListView.ListItems.Clear
- Ssql = "SELECT * FROM xt_xtgnb where sjgnbm='" + Xtgnbrec.Fields("gnbm") + "' and MenuList=1 order by gnbm"
- Set Xtgnbrec = Cw_DataEnvi.DataConnect.Execute(Ssql)
- lvListView.ColumnHeaders.Add 1, "rcsw", tvTreeView.SelectedItem.Text, 3000, , "stb"
- Do While Not Xtgnbrec.EOF
- Set mitem = lvListView.ListItems.Add()
- mitem.Text = Trim(Xtgnbrec!gnmc)
- If Xtgnbrec.Fields("mjbz") Then
- mitem.SmallIcon = "gnqx"
- mitem.Icon = "y"
- Else
- mitem.Icon = "i"
- mitem.SmallIcon = "stb"
- End If
- mitem.Key = "T" & Trim(Xtgnbrec!gnbm)
- Xtgnbrec.MoveNext
- Loop
- '---------------
- End If
- End If
- End If
- End Sub
- Private Sub tvTreeView_NodeClick(ByVal Node As MSComctlLib.Node)
- Dim Ssql As String
- If Node.Tag <> "" Then
- If Node.Tag = False Then
- Ssql = "SELECT * FROM xt_xtgnb where sjgnbm='" + Mid(Trim(tvTreeView.SelectedItem.Key), 2, Len(Trim(tvTreeView.SelectedItem.Key)) - 1) + "' and MenuList=1 order by gnbm"
- If sjgnbmStr = Mid(Trim(tvTreeView.SelectedItem.Key), 2, Len(Trim(tvTreeView.SelectedItem.Key)) - 1) Then
- Exit Sub
- Else
- sjgnbmStr = Mid(Trim(tvTreeView.SelectedItem.Key), 2, Len(Trim(tvTreeView.SelectedItem.Key)) - 1)
- End If
- Else
- Ssql = "SELECT * FROM xt_xtgnb a," _
- & "(SELECT sjgnbm FROM xt_xtgnb where gnbm='" + Mid(Trim(tvTreeView.SelectedItem.Key), 2, Len(Trim(tvTreeView.SelectedItem.Key)) - 1) + "')b" & " where a.sjgnbm=b.sjgnbm and MenuList=1 order by gnbm"
- End If
- Set Xtgnbrec = Cw_DataEnvi.DataConnect.Execute(Ssql)
- If Node.Tag = True Then
- If sjgnbmStr = Trim(Xtgnbrec!sjgnbm) Then
- Exit Sub
- Else
- sjgnbmStr = Trim(Xtgnbrec!sjgnbm)
- End If
- End If
- lvListView.ColumnHeaders.Clear
- lvListView.ListItems.Clear
- lvListView.ColumnHeaders.Add 1, "rcsw", "明细", 3000, , "stb"
- Do While Not Xtgnbrec.EOF
- Set mitem = lvListView.ListItems.Add()
- mitem.Text = Trim(Xtgnbrec!gnmc)
- If Xtgnbrec.Fields("mjbz") Then
- mitem.SmallIcon = "gnqx"
- mitem.Icon = "y"
- Else
- mitem.Icon = "i"
- mitem.SmallIcon = "stb"
- End If
- mitem.Key = "T" & Trim(Xtgnbrec!gnbm)
- Xtgnbrec.MoveNext
- Loop
- End If
- End Sub
- Private Sub lvListView_KeyPress(KeyAscii As Integer)
- If KeyAscii = vbKeyReturn Then
- Call lvListView_DblClick
- End If
- End Sub
- Public Sub Cshgns() '初始化系统功能树
- Set Xtgnbrec = Cw_DataEnvi.DataConnect.Execute("SELECT * FROM xt_xtgnb where gnbm like '14%' and MenuList=1 order by gnbm")
- tvTreeView.Nodes.Add , 4, "T", "百利/ERP5.0", "xttb"
- With Xtgnbrec
- Do While Not .EOF
- If .Fields("mjbz") Then
- Set nodX = tvTreeView.Nodes.Add("T" + Trim(.Fields("sjgnbm")), 4, "T" + Trim(.Fields("gnbm")), Trim(.Fields("gnmc")), "gnqx")
- Else
- If Trim(.Fields("sjgnbm")) = "" Then
- Set nodX = tvTreeView.Nodes.Add("T" + Trim(.Fields("sjgnbm")), 4, "T" + Trim(.Fields("gnbm")), Trim(.Fields("gnmc")), "kpgl")
- Else
- Set nodX = tvTreeView.Nodes.Add("T" + Trim(.Fields("sjgnbm")), 4, "T" + Trim(.Fields("gnbm")), Trim(.Fields("gnmc")), "stb")
- End If
- End If
- nodX.Tag = Xtgnbrec!mjbz
- If Len(Trim(.Fields("sjgnbm"))) <= 2 Then
- nodX.EnsureVisible
- End If
- .MoveNext
- Loop
- End With
- End Sub
- '系统功能树操作
- Private Sub tvTreeView_BeforeLabelEdit(Cancel As Integer) '屏蔽编辑
- Cancel = 1
- End Sub
- Private Sub tvTreeView_Collapse(ByVal Node As MSComctlLib.Node) '功能树收缩
- If Node.Index <> 1 And Node.Key <> "T14" Then
- Node.Image = "stb"
- End If
- End Sub
- Private Sub tvTreeView_Expand(ByVal Node As MSComctlLib.Node) '功能树展开
- If Node.Index <> 1 And Node.Key <> "T14" Then
- Node.Image = "szk"
- End If
- End Sub
- Private Sub tvTreeView_KeyPress(KeyAscii As Integer) '用户按回车键执行相应功能
- If KeyAscii = vbKeyReturn Then
- Call tvTreeView_DblClick
- End If
- End Sub
- Private Sub tvTreeView_DblClick() '选择功能
- If tvTreeView.SelectedItem.Children = 0 Then
- Set Xtgnbrec = Cw_DataEnvi.DataConnect.Execute("SELECT * FROM xt_xtgnb where gnbm='" + Mid(Trim(tvTreeView.SelectedItem.Key), 2, Len(Trim(tvTreeView.SelectedItem.Key)) - 1) + "'")
- If Not Xtgnbrec.EOF Then
- gnsyte = Trim(Xtgnbrec.Fields("gnsy"))
- Call Zxxymk(gnsyte)
- End If
- End If
- End Sub
- Public Sub Zxxymk(gnsy As String) '根据用户选择执行相应程序
- Dim RecTemp As New ADODB.Recordset '临时使用动态集
- Dim Sqlstr As String '临时查询字符串
- If Len(Trim(gnsy)) = 0 Then
- Exit Sub
- End If
- ' '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- ' If Not Security_Log(gnsy, Xtczybm, 1, True) Then
- ' Exit Sub
- ' End If
- On Error GoTo Cwcl:
- Xtcdcs = "1"
- Select Case gnsy
- '销售管理系统
- '文件
- Case "Xs_Register" '用户重新注册
- XT_login.HelpContextID = 1401007
- XT_login.Show 1
- Case "Xs_SysControl" '系统参数设置
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log("Xs_SysControl", Xtczybm, 1, True) Then
- Exit Sub
- End If
- Xs_SysControl.HelpContextID = 1402012
- Xs_SysControl.Show 1
- Security_Log gnsy, Xtczybm, 2, False '用户退出时写上机日志
- Case "c_quit"
- Unload XT_Main
- 'B 基础设置
- Case "Xs_B_AreaSet" '地区设置
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log("Xs_B_AreaSet", Xtczybm, 1, True) Then
- Exit Sub
- End If
- Xs_B_AreaSet.HelpContextID = 1402001
- Xs_B_AreaSet.Show 1
- Security_Log gnsy, Xtczybm, 2, False '用户退出时写上机日志
- Case "Xs_B_TradeSet" '行业设置
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log("Xs_B_TradeSet", Xtczybm, 1, True) Then
- Exit Sub
- End If
- Xs_B_TradeSet.HelpContextID = 1402002
- Xs_B_TradeSet.Show 1
- Security_Log gnsy, Xtczybm, 2, False '用户退出时写上机日志
- Case "Xs_B_SellType" '销售类型设置
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log("Xs_B_SellType", Xtczybm, 1, True) Then
- Exit Sub
- End If
- Xs_B_SellType.HelpContextID = 1402003
- Xs_B_SellType.Show 1
- Security_Log gnsy, Xtczybm, 2, False '用户退出时写上机日志
- Case "Xs_B_Custmer" '客户设置
- Gy_Customer.HelpContextID = 1402004
- Gy_Customer.Show
- Gy_CustomerQuery.Show 1
- Case "Xs_B_Deptset" '部门设置
- Gy_Department.HelpContextID = 1402005
- Gy_Department.Show 1
- Case "Xs_B_Person" '职员设置"
- Gy_Person.HelpContextID = 1402006
- Gy_Person.Show 1
- Case "Xs_B_trans" '运输方式"
- With Gy_BaseSet
- XtReportCode = "Gy_TransferWay"
- .ReportTitle = "运输方式设置"
- .TextGroupCode = "Gy_TransferWay"
- .GridCode = "Gy_TransferWay"
- .Str_RightEdit = "Gy_TransferWay_Edit"
- .str_TableName = "Gy_TransferWay"
- .str_FieldCode = "TransferWayCode"
- .str_FieldName = "TransferWayName"
- .str_Label = "运输方式"
- .Caption = "运输方式设置"
- .HelpContextID = 1402007
- .Show 1
- End With
- Case "Xs_B_TransferCompany" '承运单位设置
- Gy_TransferCompany.HelpContextID = 1402008
- Gy_TransferCompany.Show 1
- Case "Xs_B_ReturnMoneyType" '回款类型设置
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log("Xs_B_ReturnMoneyType", Xtczybm, 1, True) Then
- Exit Sub
- End If
- Xs_B_ReturnMoneyType.HelpContextID = 1402009
- Xs_B_ReturnMoneyType.Show 1
- Security_Log gnsy, Xtczybm, 2, False '用户退出时写上机日志
- Case "Xs_B_ContractType" '合同类型设置
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log("Xs_B_ContractType", Xtczybm, 1, True) Then
- Exit Sub
- End If
- Xs_B_ContractType.HelpContextID = 1402010
- Xs_B_ContractType.Show 1
- Security_Log gnsy, Xtczybm, 2, False '用户退出时写上机日志
- Case "Xs_B_PriceList" '价格清单设置
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log("Xs_B_PriceList", Xtczybm, 1, True) Then
- Exit Sub
- End If
- Xs_B_PriceList.HelpContextID = 1402011
- Xs_B_PriceList.Show
- Xs_B_PriceListQuery.Show 1
- Security_Log gnsy, Xtczybm, 2, False '用户退出时写上机日志
- Case "Xs_Q_Quotation" '报价单编制"
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log("Xs_Q_QuotationEdit", Xtczybm, 1, True) Then
- Exit Sub
- End If
- Xs_Q_Quotation.HelpContextID = 1405001
- Xs_Q_Quotation.Show 1
- Security_Log gnsy, Xtczybm, 2, False '用户退出时写上机日志
- Case "Xs_Q_QuotationList" '报价单列表"
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log("Xs_Q_QuotationList", Xtczybm, 1, True) Then
- Exit Sub
- End If
- Xs_Q_QuotationList.HelpContextID = 1405002
- Xs_Q_QuotationList.Show
- Xs_Q_QuotationQuery.Show 1
- Security_Log gnsy, Xtczybm, 2, False '用户退出时写上机日志
- Case "Xs_C_Contract" '合同编制"
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log("Xs_C_ContractEdit", Xtczybm, 1, True) Then
- Exit Sub
- End If
- Xs_C_Contract.HelpContextID = 1406001
- Xs_C_Contract.Show 1
- Security_Log gnsy, Xtczybm, 2, False '用户退出时写上机日志
- Case "Xs_C_ContractList" '合同列表"
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log("Xs_C_ContractList", Xtczybm, 1, True) Then
- Exit Sub
- End If
- Xs_C_ContractList.HelpContextID = 1406002
- Xs_C_ContractList.Show
- Xs_C_ContractQuery.Show 1
- Security_Log gnsy, Xtczybm, 2, False '用户退出时写上机日志
- 'P 销售计划
- Case "Xs_P_DeptPlan" '部门销售计划编制
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log("Xs_P_DeptPlan", Xtczybm, 1, True) Then
- Exit Sub
- End If
- Xs_P_DeptPlan.HelpContextID = 1404001
- Xs_P_DeptPlanQuery.Show 1
- Security_Log gnsy, Xtczybm, 2, False '用户退出时写上机日志
- Case "Xs_P_PersonPlan" '销售员/货物销售计划编制"
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log("Xs_P_PersonPlan", Xtczybm, 1, True) Then
- Exit Sub
- End If
- FrmString = "Xs_P_PersonPlan"
- Xs_P_PersonPlan.HelpContextID = 1404002
- Xs_P_PersonPlanQuery.Show
- Security_Log gnsy, Xtczybm, 2, False '用户退出时写上机日志
- Case "Xs_P_WarePlan" '货物销售计划编制"
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log("Xs_P_WarePlan", Xtczybm, 1, True) Then
- Exit Sub
- End If
- FrmString = "Xs_P_WarePlan"
- Xs_P_WarePlan.HelpContextID = 1404003
- Xs_P_PersonPlanQuery.Show
- Security_Log gnsy, Xtczybm, 2, False '用户退出时写上机日志
- Case "Xs_P_CustPlan" '客户销售计划编制"
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log("Xs_P_CustPlan", Xtczybm, 1, True) Then
- Exit Sub
- End If
- FrmString = "Xs_P_CusPlan"
- Xs_P_CusPlan.HelpContextID = 1404004
- Xs_P_PersonPlanQuery.Show
- Security_Log gnsy, Xtczybm, 2, False '用户退出时写上机日志
- Case "Xs_P_DepExecute" '部门销售计划执行情况"
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log("Xs_P_DepExecute", Xtczybm, 1, True) Then
- Exit Sub
- End If
- Xs_P_DepExecute.HelpContextID = 1404005
- Xs_P_DepExecute.Show
- Xs_P_DepExecuteQuery.Show 1
- Security_Log gnsy, Xtczybm, 2, False '用户退出时写上机日志
- Case "Xs_P_PersonExecute" '销售员/货物销售计划执行情况"
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log("Xs_P_PersonExecute", Xtczybm, 1, True) Then
- Exit Sub
- End If
- Xs_P_PersonExecute.HelpContextID = 1404006
- Xs_P_PersonExecute.Show
- Xs_P_PersonExecuteQuery.Show 1
- Security_Log gnsy, Xtczybm, 2, False '用户退出时写上机日志
- Case "Xs_P_WareExecute" '货物销售计划执行情况"
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log("Xs_P_WareExecute", Xtczybm, 1, True) Then
- Exit Sub
- End If
- Xs_P_WareExecute.HelpContextID = 1404007
- Xs_P_WareExecute.Show
- Xs_P_WareExecuteQuery.Show 1
- Security_Log gnsy, Xtczybm, 2, False '用户退出时写上机日志
- Case "Xs_P_CustplanExecute" '客户销售计划执行情况"
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log("Xs_P_CustplanExecute", Xtczybm, 1, True) Then
- Exit Sub
- End If
- Xs_P_CusExecute.HelpContextID = 1404008
- Xs_P_CusExecute.Show
- Xs_P_CusExecuteQuery.Show 1
- Security_Log gnsy, Xtczybm, 2, False '用户退出时写上机日志
- 'O 订单
- Case "Xs_O_OrderBill" '订单编制"
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log("Xs_O_OrderBillEdit", Xtczybm, 1, True) Then
- Exit Sub
- End If
- Xs_O_OrderBill.HelpContextID = 1407001
- Xs_O_OrderBill.Show 1
- Security_Log gnsy, Xtczybm, 2, False '用户退出时写上机日志
- Case "Xs_O_OrderList" '订单列表"
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log("Xs_O_OrderList", Xtczybm, 1, True) Then
- Exit Sub
- End If
- Xs_O_OrderList.HelpContextID = 1407002
- Xs_O_OrderList.Show
- Xs_O_OrderQuery.Show 1
- Security_Log gnsy, Xtczybm, 2, False '用户退出时写上机日志
- Case "Xs_O_OrderExec" '订单执行情况"
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log("Xs_O_OrderExec", Xtczybm, 1, True) Then
- Exit Sub
- End If
- Xs_O_OrderExec.HelpContextID = 1407003
- Xs_O_OrderExec.Show
- Xs_O_OrderExecQuery.Show 1
- Security_Log gnsy, Xtczybm, 2, False '用户退出时写上机日志
- 'C 发货单
- Case "Xs_C_ConsignBill" '发货单编制"
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log("Xs_C_ConsignBillEdit", Xtczybm, 1, True) Then
- Exit Sub
- End If
- Xs_C_ConsignBill.HelpContextID = 1408001
- Xs_C_ConsignBill.Show 1
- Security_Log gnsy, Xtczybm, 2, False '用户退出时写上机日志
- Case "Xs_C_ConsignList" '发货单列表"
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log("Xs_C_ConsignList", Xtczybm, 1, True) Then
- Exit Sub
- End If
- Xs_C_ConsignList.HelpContextID = 1408002
- Xs_C_ConsignList.Show
- Xs_Ccx_ConsignList.Show 1
- Security_Log gnsy, Xtczybm, 2, False '用户退出时写上机日志
- Case "Xs_C_ConsignDisp" '发货单回执处理"
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log("Xs_C_ConsignDisp", Xtczybm, 1, True) Then
- Exit Sub
- End If
- Xs_C_ConsignDisp.HelpContextID = 1408003
- Xs_C_ConsignDisp.Show
- Xs_Ccx_ConsignDisp.Show 1
- Security_Log gnsy, Xtczybm, 2, False '用户退出时写上机日志
- 'Q 退货单
- Case "Xs_Q_QuitWare" '退货单编制"
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log("Xs_Q_QuitWareEdit", Xtczybm, 1, True) Then
- Exit Sub
- End If
- Xs_Q_QuitWare.HelpContextID = 1409001
- Xs_Q_QuitWare.Show 1
- Security_Log gnsy, Xtczybm, 2, False '用户退出时写上机日志
- Case "Xs_Q_QuitWareList" '退货单列表"
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log("Xs_Q_QuitWareList", Xtczybm, 1, True) Then
- Exit Sub
- End If
- Xs_Q_QuitWareList.HelpContextID = 1409002
- Xs_Q_QuitWareList.Show
- Xs_Qcx_QuitWareList.Show 1
- Security_Log gnsy, Xtczybm, 2, False '用户退出时写上机日志
- 'I 发票
- Case "Xs_I_InvoiceBill" '普通发票编制"
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log("Xs_I_InvoiceBillEdit", Xtczybm, 1, True) Then
- Exit Sub
- End If
- Xs_I_InvoiceBill.HelpContextID = 1410001
- Xs_I_InvoiceBill.Show 1
- Security_Log gnsy, Xtczybm, 2, False '用户退出时写上机日志
- Case "Xs_I_RedInvoice" '普通红字发票编制"
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log("Xs_I_RedInvoiceEdit", Xtczybm, 1, True) Then
- Exit Sub
- End If
- Xs_I_RedInvoice.HelpContextID = 1410002
- Xs_I_RedInvoice.Show 1
- Security_Log gnsy, Xtczybm, 2, False '用户退出时写上机日志
- Case "Xs_I_InvoiceList" '普通发票列表"
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log("Xs_I_InvoiceList", Xtczybm, 1, True) Then
- Exit Sub
- End If
- Xs_I_InvoiceList.HelpContextID = 1410003
- Xs_I_InvoiceList.Show
- Xs_Icx_InvoiceList.Show 1
- Security_Log gnsy, Xtczybm, 2, False '用户退出时写上机日志
- Case "Xs_I_UseInvoice" '专用发票编制"
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log("Xs_I_UseInvoiceEdit", Xtczybm, 1, True) Then
- Exit Sub
- End If
- Xs_I_UseInvoice.HelpContextID = 1410004
- Xs_I_UseInvoice.Show 1
- Security_Log gnsy, Xtczybm, 2, False '用户退出时写上机日志
- Case "Xs_I_UseRedInvoice" '专用红字发票编制"
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log("Xs_I_UseRedInvoiceEdit", Xtczybm, 1, True) Then
- Exit Sub
- End If
- Xs_I_UseRedInvoice.HelpContextID = 1410005
- Xs_I_UseRedInvoice.Show 1
- Security_Log gnsy, Xtczybm, 2, False '用户退出时写上机日志
- Case "Xs_I_UseInvoicelist" '专用发票列表"
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log("Xs_I_UseInvoicelist", Xtczybm, 1, True) Then
- Exit Sub
- End If
- Xs_I_UseInvoicelist.HelpContextID = 1410006
- Xs_I_UseInvoicelist.Show
- Xs_Icx_UseInvoicelist.Show 1
- Security_Log gnsy, Xtczybm, 2, False '用户退出时写上机日志
- 'M 回款
- Case "Xs_M_ReturnMoney" '回款处理"
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log("Xs_M_ReturnMoneyEdit", Xtczybm, 1, True) Then
- Exit Sub
- End If
- Xs_M_ReturnMoney.HelpContextID = 1411001
- Xs_M_ReturnMoney.Show 1
- Security_Log gnsy, Xtczybm, 2, False '用户退出时写上机日志
- Case "Xs_M_ReturnMoneyList" '回款列表"
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log("Xs_M_ReturnMoneyList", Xtczybm, 1, True) Then
- Exit Sub
- End If
- Xs_M_ReturnMoneyList.HelpContextID = 1411002
- Xs_M_ReturnMoneyList.Show
- Xs_Mcx_ReturnMoneyList.Show 1
- Security_Log gnsy, Xtczybm, 2, False '用户退出时写上机日志
- Case "Xs_M_MoneyWareList" '回款核销明细"
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log("Xs_M_MoneyWareList", Xtczybm, 1, True) Then
- Exit Sub
- End If
- Xs_M_MoneyWareList.HelpContextID = 1411003
- Xs_M_MoneyWareList.Show
- Xs_Mcx_MoneyWareList.Show 1
- Security_Log gnsy, Xtczybm, 2, False '用户退出时写上机日志
- '成品库存查询
- Case "Xs_StockQuery" '成品库存查询"
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log("Xs_StockQuery", Xtczybm, 1, True) Then
- Exit Sub
- End If
- KF_FrmNowQuan.HelpContextID = 1412001
- KF_FrmNowQuan.Show
- KF_FrmNowQuanCxtj.Show 1
- Security_Log gnsy, Xtczybm, 2, False '用户退出时写上机日志
- 'C 结帐
- Case "Xs_Z_MonthAccount" '月末结帐"
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log("Xs_Z_MonthAccount", Xtczybm, 1, True) Then
- Exit Sub
- End If
- Xs_Z_MonthAccount.BlTemp = True
- Xs_Z_MonthAccount.HelpContextID = 1415001
- Xs_Z_MonthAccount.Show
- Security_Log gnsy, Xtczybm, 2, False '用户退出时写上机日志
- Case "Xs_Z_UnMonthAccount" '取消结帐"
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log("Xs_Z_UnMonthAccount", Xtczybm, 1, True) Then
- Exit Sub
- End If
- Xs_Z_MonthAccount.BlTemp = False
- Xs_Z_MonthAccount.HelpContextID = 1415002
- Xs_Z_MonthAccount.Show
- Security_Log gnsy, Xtczybm, 2, False '用户退出时写上机日志
- 'R 统计报表
- Case "Xs_R_GeneralAccount" '销售总帐"
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log("Xs_R_GeneralAccount", Xtczybm, 1, True) Then
- Exit Sub
- End If
- Xs_R_GeneralAccount.HelpContextID = 1413001
- Xs_R_GeneralAccount.Show
- Xs_R_GeneralAccountQuery.Show 1
- Security_Log gnsy, Xtczybm, 2, False '用户退出时写上机日志
- Case "Xs_R_SaleAccount" '销售明细帐"
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log("Xs_R_SaleAccount", Xtczybm, 1, True) Then
- Exit Sub
- End If
- Xs_R_SaleAccount.HelpContextID = 1413002
- Xs_R_SaleAccount.Show
- Xs_R_SaleAccountQuery.Show 1
- Security_Log gnsy, Xtczybm, 2, False '用户退出时写上机日志
- Case "Xs_R_SaleThing" '销售执行情况报表
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log("Xs_R_SaleThing", Xtczybm, 1, True) Then
- Exit Sub
- End If
- Xs_R_SaleThing.HelpContextID = 1413003
- Xs_R_SaleThing.Show
- Xs_R_SaleThingQuery.Show 1
- Security_Log gnsy, Xtczybm, 2, False '用户退出时写上机日志
- Case "Xs_R_ConsignThing" '发货单执行情况"
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log("Xs_R_ConsignThing", Xtczybm, 1, True) Then
- Exit Sub
- End If
- Xs_R_ConsignThing.HelpContextID = 1413004
- Xs_R_ConsignThing.Show
- Xs_R_ConsignThingQuery.Show 1
- Security_Log gnsy, Xtczybm, 2, False '用户退出时写上机日志
- Case "Xs_R_consignlist" '发货明细表"
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log("Xs_R_consignlist", Xtczybm, 1, True) Then
- Exit Sub
- End If
- Xs_R_consignlist.HelpContextID = 1413005
- Xs_R_consignlist.Show
- Xs_R_ConsignListQuery.Show 1
- Security_Log gnsy, Xtczybm, 2, False '用户退出时写上机日志
- Case "Xs_R_SaleList" '销售明细表"
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log("Xs_R_SaleList", Xtczybm, 1, True) Then
- Exit Sub
- End If
- Xs_R_SaleList.HelpContextID = 1413006
- Xs_R_SaleList.Show
- Xs_R_SaleListQuery.Show 1
- Security_Log gnsy, Xtczybm, 2, False '用户退出时写上机日志
- Case "Xs_R_returnlist" '回款明细表"
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log("Xs_R_returnlist", Xtczybm, 1, True) Then
- Exit Sub
- End If
- Xs_R_returnlist.HelpContextID = 1413007
- Xs_R_returnlist.Show
- Xs_R_ReturnListQuery.Show 1
- Security_Log gnsy, Xtczybm, 2, False '用户退出时写上机日志
- 'A 分析
- Case "Xs_A_FlowAnalysis" '货物流向分析"
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log("Xs_A_FlowAnalysis", Xtczybm, 1, True) Then
- Exit Sub
- End If
- Xs_A_FlowAnalysis.HelpContextID = 1414001
- Xs_A_FlowAnalysis.Show
- Xs_A_FlowAnalysisQuery.Show 1
- Security_Log gnsy, Xtczybm, 2, False '用户退出时写上机日志
- Case "Xs_A_FrameAnalysis" '销售结构分析"
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log("Xs_A_FrameAnalysis", Xtczybm, 1, True) Then
- Exit Sub
- End If
- Xs_A_FrameAnalysis.HelpContextID = 1414002
- Xs_A_FrameAnalysis.Show
- Xs_A_FrameAnalysisQuery.Show 1
- Security_Log gnsy, Xtczybm, 2, False '用户退出时写上机日志
- Case "Xs_A_MarketAnalysis" '市场分析"
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log("Xs_A_MarketAnalysis", Xtczybm, 1, True) Then
- Exit Sub
- End If
- Xs_A_MarketAnalysis.HelpContextID = 1414003
- Xs_A_MarketAnalysis.Show
- Xs_A_MarketAnalysisQuery.Show 1
- Security_Log gnsy, Xtczybm, 2, False '用户退出时写上机日志
- Case "Xs_A_WareAnalysis" '货龄分析"
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log("Xs_A_WareAnalysis", Xtczybm, 1, True) Then
- Exit Sub
- End If
- Xs_A_WareAnalysis.HelpContextID = 1414004
- Xs_A_WareAnalysis.Show
- Xs_A_WareAnalysisQuery.Show 1
- Security_Log gnsy, Xtczybm, 2, False '用户退出时写上机日志
- Case "Xs_A_RiseAnalysis" '销售增长分析"
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log("Xs_A_RiseAnalysis", Xtczybm, 1, True) Then
- Exit Sub
- End If
- Xs_A_RiseAnalysis.HelpContextID = 1414005
- Xs_A_RiseAnalysis.Show
- Xs_A_RiseAnalysisQuery.Show 1
- Security_Log gnsy, Xtczybm, 2, False '用户退出时写上机日志
- 'D 数据
- Case "Xs_PreDataInput" '期初数据"
- '判断用户是否有此功能执行权限,如有则写上机日志(进入)
- If Not Security_Log("Xs_PreDataInput", Xtczybm, 1, True) Then
- Exit Sub
- End If
- Xtcdcs = "5"
- Set RecTemp = Cw_DataEnvi.DataConnect.Execute("select consignbillmainid from Xs_ConsignBillMain Where AccountOpt<>''")
- If RecTemp.RecordCount > 0 Then
- Tsxx = "期初已结帐,不能再录入期初数据!"
- Call Xtxxts(Tsxx, 0, 4)
- Exit Sub
- End If
- Xs_C_ConsignBill.HelpContextID = 1403001
- Xs_C_ConsignBill.Show 1
- Security_Log gnsy, Xtczybm, 2, False '用户退出时写上机日志
- Case "Xs_DataOut" '数据导出"
- '工具
- Case "c_gnbmjsq" '计算器
- Shell App.Path & "calc.exe", vbNormalNoFocus
- Case "c_gnbmkmrl" '会计日历
- XT_kjrlFrm.HelpContextID = 1416001
- XT_kjrlFrm.Show 1
- '帮助
- Case "c_xtbz" '系统帮助
- Call F1bz
- Case "c_gy" '关于
- XT_frmAbout.Show 1
- End Select
- '用户退出时写上机日志
- Security_Log gnsy, Xtczybm, 2, False
- Exit Sub
- Cwcl:
- Tsxx = "此项系统功能有待完善!"
- Call Xtxxts(Tsxx, 0, 4)
- Exit Sub
- End Sub
- Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer) '用户关闭窗体
- If Unload_TF = False Then
- Cancel = 1
- Me.WindowState = 1
- End If
- End Sub
- Private Sub Form_Load()
- '设置窗体图标
- Me.Icon = XT_Main.Icon
- '设置窗体位置大小,并调入系统功能树
- Me.Left = 0
- Me.Top = 0
- Me.Width = XT_Main.Width - 60
- Me.Height = XT_Main.Height - 760 - 690
- Call Cshgns
- '启动调入数据等待提示
- Load Xt_Wait
- End Sub
- Private Sub Form_Unload(Cancel As Integer)
- On Error Resume Next
- Dim i As Integer
- 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", lvListView.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
- lvListView.Refresh
- 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 < 3500 Then X = 3500
- If X > (Me.Width - 1500) Then X = Me.Width - 1500
- tvTreeView.Width = X
- imgSplitter.Left = X
- lvListView.Left = X + 40
- lvListView.Width = Me.Width - (tvTreeView.Width + 140)
- lblTitle(0).Width = tvTreeView.Width
- lblTitle(1).Left = lvListView.Left + 20
- lblTitle(1).Width = lvListView.Width - 40
- '设置 Top 属性
- tvTreeView.Top = tbToolBar.Height + picTitles.Height
- lvListView.Top = tvTreeView.Top
- '设置 height 属性
- tvTreeView.Height = Me.ScaleHeight - (picTitles.Top + picTitles.Height)
- lvListView.Height = tvTreeView.Height
- imgSplitter.Top = tvTreeView.Top
- imgSplitter.Height = tvTreeView.Height
- End Sub
- Private Sub tbToolBar_ButtonClick(ByVal Button As MSComctlLib.Button)
- On Error Resume Next
- Select Case Button.Key
- Case "返回"
- tvTreeView.SetFocus
- SendKeys "{up}", True
- Case "向前"
- tvTreeView.SetFocus
- SendKeys "{DOWN}", True
- Case "大图标"
- lvListView.View = lvwIcon
- Case "小图标"
- lvListView.View = lvwSmallIcon
- Case "列表"
- lvListView.View = lvwList
- Case "详细资料"
- lvListView.View = lvwReport
- End Select
- End Sub