📄 frmmain.frm
字号:
Left = 2760
Top = 480
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 16
ImageHeight = 16
MaskColor = 12632256
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 2
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "FrmMain.frx":2EE8
Key = "Main"
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "FrmMain.frx":333A
Key = "Selected"
EndProperty
EndProperty
End
Begin MSComctlLib.StatusBar SBar
Align = 2 'Align Bottom
Height = 375
Left = 0
TabIndex = 10
Top = 2820
Width = 4680
_ExtentX = 8255
_ExtentY = 661
_Version = 393216
BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628}
NumPanels = 7
BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Object.Width = 2646
MinWidth = 2646
Picture = "FrmMain.frx":378C
EndProperty
BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628}
AutoSize = 2
Text = "进度:"
TextSave = "进度:"
EndProperty
BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Object.Width = 4762
MinWidth = 4762
EndProperty
BeginProperty Panel4 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Object.Width = 4410
MinWidth = 4410
EndProperty
BeginProperty Panel5 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Object.Width = 4410
MinWidth = 4410
EndProperty
BeginProperty Panel6 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Style = 5
Object.Width = 1411
MinWidth = 1411
TextSave = "13:40"
EndProperty
BeginProperty Panel7 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Object.Width = 661
MinWidth = 661
Picture = "FrmMain.frx":7E2E
EndProperty
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin MSComctlLib.ImageList ImgListView
Left = 2040
Top = 1440
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 16
ImageHeight = 16
MaskColor = 12632256
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 4
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "FrmMain.frx":AC78
Key = "File"
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "FrmMain.frx":B0CA
Key = "Volume"
EndProperty
BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "FrmMain.frx":B51C
Key = "ColVolume"
EndProperty
BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "FrmMain.frx":B836
Key = "ColFile"
EndProperty
EndProperty
End
Begin MSComctlLib.ImageList ImageLVNormal
Left = 2760
Top = 1440
_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 = "FrmMain.frx":BC88
Key = "File"
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "FrmMain.frx":C0DA
Key = "Volume"
EndProperty
BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "FrmMain.frx":C52C
Key = "ColVolume"
EndProperty
BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "FrmMain.frx":C846
Key = "ColFile"
EndProperty
EndProperty
End
Begin VB.Image VImgDrag
Height = 645
Left = 1920
MousePointer = 9 'Size W E
Top = 360
Width = 120
End
Begin VB.Menu m_File
Caption = "文 件 &F "
Begin VB.Menu m_File_Do
Caption = "文件浏览"
Index = 0
End
End
Begin VB.Menu m_View
Caption = "查 看 &V "
Begin VB.Menu m_Tree
Caption = "视图1"
Index = 0
End
Begin VB.Menu s
Caption = "-"
End
Begin VB.Menu m_View_Do
Caption = "大图标"
Index = 0
End
Begin VB.Menu m_View_Do
Caption = "小图标"
Index = 1
End
Begin VB.Menu m_View_Do
Caption = "列表"
Index = 2
End
Begin VB.Menu m_View_Do
Caption = "详细资料"
Checked = -1 'True
Index = 3
End
Begin VB.Menu m_View_Do
Caption = "-"
Index = 4
End
Begin VB.Menu m_View_Do
Caption = "刷新"
Index = 5
Shortcut = {F5}
End
End
Begin VB.Menu m_Box
Caption = "档案盒 &B "
Begin VB.Menu m_Box_Do
Caption = "档案盒浏览"
Index = 0
End
End
Begin VB.Menu m_Volume
Caption = "案 卷 &L "
Begin VB.Menu m_Volume_Do
Caption = "案卷浏览"
Index = 0
End
Begin VB.Menu m_Volume_Do
Caption = "-"
Index = 1
Visible = 0 'False
End
Begin VB.Menu m_Volume_Do
Caption = "目录打印"
Enabled = 0 'False
Index = 2
Visible = 0 'False
End
End
Begin VB.Menu m_Report
Caption = "报 表 &R "
Visible = 0 'False
End
Begin VB.Menu m_Tool
Caption = "工 具 &T "
Begin VB.Menu m_Tool_Do
Caption = "档案查询"
Index = 0
Shortcut = {F3}
End
Begin VB.Menu m_Tool_Do
Caption = "移交登记"
Index = 1
Visible = 0 'False
End
Begin VB.Menu m_Tool_Do
Caption = "销毁登记"
Index = 2
Visible = 0 'False
End
End
Begin VB.Menu mnu_sys
Caption = "系 统 &S "
Begin VB.Menu mnu_sel
Caption = "选择路径(&S)"
End
Begin VB.Menu mnu_lock
Caption = "锁定工作站(&L)"
End
Begin VB.Menu mnu_inf
Caption = "光盘查询信息"
End
Begin VB.Menu mnu_tree
Caption = "目录树定义"
End
Begin VB.Menu dd
Caption = "-"
End
Begin VB.Menu mnu_exit
Caption = "退 出(&X)"
End
End
Begin VB.Menu m_Help
Caption = "帮 助 &H "
Begin VB.Menu m_Help_Do
Caption = "关于..."
End
End
End
Attribute VB_Name = "FrmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public gWidthRate As Single '宽度比例
Public gHeightRate As Single '高度比例
Const gBorderWidth = 40 '控件间距
Const sglSplitLimit = 500
Public VDragFlag As Boolean '垂直拖动标志
Public HDragFlag As Boolean '水平拖动标志
Dim gCol_System_Dict() As String '记录列表中每列在数据库中字段对应的系统字典表的类型
Public gLVVolumeMButton As Integer '记录LVVolume的Mouse Button的值
Public gObjectType As Integer '操作对象类型0 文件 1案卷 2盒
'###################################################################################
'程序界面控制模块
'###################################################################################
'###################################################################################
'设置PicMain中控件位置 返回Boolean
'参数:
' CmdNum按钮数量 ActiveCmdidx 要激活的按钮
' ChangeActive 是否改变当前激活按钮 CmdHeight 按钮高
'当参数为0时即保持原有设置不变
'###################################################################################
Public Function SetTVMain(CmdNum As Integer, ActiveCmdIdx As Integer, ChangeActive As Boolean, CmdHeight As Long) As Boolean
On Error GoTo Err
Dim i As Integer
Dim CmdCaption As String '按钮标题
Dim tHeight, CmdTotalHeight As Long '临时高度变量
If CmdNum <= 0 Then CmdNum = CmdMain.Count
''''''''''检验???????????
'增加、减少按钮
If CmdNum > CmdMain.Count Then
For i = CmdMain.Count To CmdNum - 1
If GetCmdCaption(i, CmdCaption) = False Then
End If
Load CmdMain(i)
CmdMain(i).Visible = True
Next i
ElseIf CmdNum < CmdMain.Count Then
For i = CmdMain.Count - 1 To CmdNum
Unload CmdMain(i)
Next i
End If
'获取应置为活动的按钮Index
If CmdHeight <> 0 Then CmdMain(0).Height = CmdHeight
If ChangeActive = False Then
ActiveCmdIdx = 0
For i = 0 To CmdMain.Count - 1
If CmdMain(i).FontBold = True Then ActiveCmdIdx = i
Next i
Else
If ActiveCmdIdx < 0 Or ActiveCmdIdx > CmdNum - 1 Then
ActiveCmdIdx = 0
End If
If CmdMain(ActiveCmdIdx).Visible = False Then ActiveCmdIdx = 0
End If
CmdMain(ActiveCmdIdx).Visible = True
'设置PicMain中控件位置
tHeight = 0
For i = 0 To CmdNum - 1
If CmdMain(i).Visible = True Then
CmdTotalHeight = CmdTotalHeight + CmdMain(0).Height
End If
Next i
For i = 0 To CmdNum - 1
CmdMain(i).FontBold = False
CmdMain(i).BackColor = &H8000000F
If CmdMain(i).Visible = True Then
CmdMain(i).Move 20, tHeight, PicMain.Width - 70, CmdMain(0).Height
tHeight = tHeight + CmdMain(0).Height
If ActiveCmdIdx = i Then
CmdMain(i).FontBold = True
CmdMain(i).BackColor = &HC0C0FF '&HC0FFC0
If i = CmdNum - 1 Then
TVMain.Move 0, tHeight, PicMain.Width, PicMain.Height - CmdTotalHeight
Else
TVMain.Move 0, tHeight, PicMain.Width, PicMain.Height - CmdTotalHeight - 60
End If
tHeight = tHeight + TVMain.Height
End If
End If
Next i
Err:
End Function
'###################################################################################
'获取按钮标题,即Tree_Name
'###################################################################################
Public Function GetCmdCaption(CmdIndex As Integer, CmdCaption As String) As Boolean
On Error GoTo Err
CmdCaption = CStr(CmdIndex)
GetCmdCaption = True
Exit Function
Err:
GetCmdCaption = False
End Function
Private Sub CmdMain_Click(Index As Integer)
Dim CmdCaption As String
Dim i As Integer
On Error GoTo Err
Me.MousePointer = vbHourglass '设置鼠标
Call SetTVMain(0, Index, True, 0) '设置按钮位置
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -