📄 frmmain.frm
字号:
Begin VB.Menu mnu_File_Do
Caption = "-"
Index = 2
End
Begin VB.Menu mnu_File_Do
Caption = "封盘(&L)"
Index = 3
End
Begin VB.Menu mnu_File_Do
Caption = "解除封盘(&U)"
Index = 4
End
Begin VB.Menu mnu_File_Do
Caption = "刻盘登记(&M)"
Index = 5
End
Begin VB.Menu mnu_File_Do
Caption = "-"
Index = 6
End
Begin VB.Menu mnu_File_Do
Caption = "光盘离线(&O)"
Index = 7
End
Begin VB.Menu mnu_File_Do
Caption = "添加光盘登记(&S)"
Index = 8
End
End
Begin VB.Menu mnu_option
Caption = "选 项(&O) "
Begin VB.Menu mnu_option_do
Caption = "可用(&A)"
Checked = -1 'True
Index = 0
End
Begin VB.Menu mnu_option_do
Caption = "离线(&O)"
Checked = -1 'True
Index = 1
End
Begin VB.Menu mnu_option_do
Caption = "禁用(&U)"
Checked = -1 'True
Index = 2
End
End
Begin VB.Menu mnu_tool
Caption = "工 具(&T) "
Visible = 0 'False
Begin VB.Menu mnu_tool_do
Caption = "映射(&M)"
Index = 0
End
Begin VB.Menu mnu_tool_do
Caption = "断开(&U)"
Index = 1
End
End
Begin VB.Menu mnu_sys
Caption = "系 统(&S) "
Begin VB.Menu mnu_sys_do
Caption = "锁定工作站(&L)"
Index = 0
End
Begin VB.Menu mnu_sys_do
Caption = "修改密码(&C)"
Index = 1
End
Begin VB.Menu mnu_sys_do
Caption = "-"
Index = 2
End
Begin VB.Menu mnu_sys_do
Caption = "清除临时文件"
Index = 3
End
Begin VB.Menu mnu_sys_do
Caption = "刻录光盘"
Index = 4
End
Begin VB.Menu mnu_sys_do
Caption = "-"
Index = 5
End
Begin VB.Menu mnu_sys_do
Caption = "退出(&X)"
Index = 6
End
End
Begin VB.Menu mnu_help
Caption = "帮 助(&H) "
Begin VB.Menu mnu_about
Caption = "关于(&A)..."
End
End
Begin VB.Menu mnu_pop
Caption = "弹出"
Visible = 0 'False
Begin VB.Menu mnu_pop_do
Caption = "浏览"
Index = 0
End
Begin VB.Menu mnu_pop_do
Caption = "-"
Index = 1
End
Begin VB.Menu mnu_pop_do
Caption = "大图标(&G)"
Index = 2
End
Begin VB.Menu mnu_pop_do
Caption = "小图标(&M)"
Index = 3
End
Begin VB.Menu mnu_pop_do
Caption = "列 表(&L)"
Index = 4
End
Begin VB.Menu mnu_pop_do
Caption = "详细资料(&D)"
Index = 5
End
Begin VB.Menu mnu_pop_do
Caption = "-"
Index = 6
End
Begin VB.Menu mnu_pop_do
Caption = "刷 新(&R)"
Index = 7
End
End
Begin VB.Menu mnu_pdir
Caption = "目录弹出"
Visible = 0 'False
Begin VB.Menu mnu_dir_pop
Caption = "新建(&N)"
Enabled = 0 'False
Index = 0
End
Begin VB.Menu mnu_dir_pop
Caption = "删除(&D)"
Enabled = 0 'False
Index = 1
End
Begin VB.Menu mnu_dir_pop
Caption = "-"
Index = 2
End
Begin VB.Menu mnu_dir_pop
Caption = "激活(&E)"
Enabled = 0 'False
Index = 3
End
Begin VB.Menu mnu_dir_pop
Caption = "禁用(&D)"
Enabled = 0 'False
Index = 4
End
Begin VB.Menu mnu_dir_pop
Caption = "-"
Index = 5
End
Begin VB.Menu mnu_dir_pop
Caption = "属性(&P)"
Index = 6
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
Dim iconn% 'The current icon number in a file
Dim iconfilename$ 'The filename of the icon file(.EXE, .DLL, .ICO)
Dim numicons% 'The number of icons in a file
Public gWidthRate As Single '宽度比例
Const gBorderWidth = 60 '控件间距
Const sglSplitLimit = 500
Public DragFlag As Boolean '垂直拖动标志
Public gMouseBtn As Integer '鼠标按键
Public gKeyString As String '全局关键字串
'#####################################################################################
'窗体初始化
'#####################################################################################
Public Sub FrmInit()
On Error GoTo Err
If gWidthRate <= 0 Or gWidthRate >= 1 Then gWidthRate = 0.4
Pic1.Move 0, Tbar.Height, Me.Width * gWidthRate, Me.ScaleHeight - SBar.Height - Tbar.Height 'CoolBar.Height
ImgDrag.Move Pic1.Width, Pic1.Top, gBorderWidth, Pic1.Height
Pic2.Move ImgDrag.Left + ImgDrag.Width, Pic1.Top, Me.ScaleWidth - (ImgDrag.Left + ImgDrag.Width), Pic1.Height
Err:
End Sub
Private Sub Cbx_Change()
Call Cbx_Click
End Sub
Private Sub Cbx_Click()
On Error GoTo Err
Dim i As Long
If Cbx.ListIndex <> -1 Then
For i = 1 To TVMain.Nodes.Count
If TVMain.Nodes(i).FullPath = Cbx.List(Cbx.ListIndex) Then
Set TVMain.SelectedItem = TVMain.Nodes(i)
Call TVMain_NodeClick(TVMain.Nodes(i))
Exit For
End If
Next i
End If
Err:
End Sub
Private Sub CmdClear_Click()
Cbx.Clear
End Sub
Private Sub Form_Load()
On Error GoTo Err
Dim i As Integer
Dim t As String
'gKeyString = "systemmanage"
'gConvert_To_Dict = True
'gAutoManageDict = "(1,8,9,51,18)"
Call TVRefresh("")
'SBar.Panels(4).Text = GetComPuter
For i = 0 To 3
If i = gLVMainView Then
mnu_view_do(i).Checked = True
Else
mnu_view_do(i).Checked = False
End If
Next
If RegGetString(HKEY_LOCAL_MACHINE, gRegSubKey + "\OPTION", "WidthRate", t) = False Then GoTo Err
gWidthRate = CSng(t)
Err:
End Sub
Private Sub Form_Resize()
Call FrmInit
End Sub
Private Sub Form_Unload(Cancel As Integer)
On Error GoTo Err
If MsgBox("你真的要退出系统?", vbQuestion + vbOKCancel, "提示信息") = vbCancel Then
Cancel = -1
Exit Sub
End If
Call LogOut(g_User_Info.Login_Name, 0)
Call SaveEventLog("1007", 0, "", "", "用户退出")
Call CloseDB
End
Err:
End Sub
'水平分割线
Private Sub ImgDrag_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
With ImgDrag
PicDrag.Move .Left, .Top, .Width, .Height
End With
PicDrag.Visible = True
DragFlag = True
End Sub
Private Sub ImgDrag_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
Dim sglPos As Single
If DragFlag Then
sglPos = x + ImgDrag.Left
If sglPos < sglSplitLimit Then
PicDrag.Left = sglSplitLimit
ElseIf sglPos > Me.Width - sglSplitLimit Then
PicDrag.Left = Me.Width - sglSplitLimit
Else
PicDrag.Left = sglPos
End If
End If
End Sub
Private Sub ImgDrag_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
gWidthRate = PicDrag.Left / Me.ScaleWidth
RegSetString HKEY_LOCAL_MACHINE, gRegSubKey + "\OPTION", "WidthRate", CStr(gWidthRate)
Call FrmInit
PicDrag.Visible = False
DragFlag = False
End Sub
Private Sub LVMain_ColumnClick(ByVal ColumnHeader As MSComctlLib.ColumnHeader)
LVMain.Sorted = True
If LVMain.SortKey = ColumnHeader.Index - 1 Then
If LVMain.SortOrder = lvwAscending Then
LVMain.SortOrder = lvwDescending
Else
LVMain.SortOrder = lvwAscending
End If
Else
LVMain.SortKey = ColumnHeader.Index - 1
End If
End Sub
Private Sub LVMain_DblClick()
On Error GoTo Err
Dim tTypeCode As String
Dim tFileID As String
Dim rRights As Integer
Dim rEffectiveTime As String
Dim rExpireTime As String
Dim rMaxRights As Integer
Dim rHasRight As Integer
Dim Rtncode As String
Dim i As Integer
If LVMain.SelectedItem Is Nothing Then Exit Sub
SetMousePointer 11
If LVMain.SelectedItem.SubItems(1) = "文件夹" Then
For i = 1 To TVMain.Nodes.Count
If TVMain.Nodes(i).FullPath = TVMain.SelectedItem.FullPath + "\" + LVMain.SelectedItem.Text Then
Set TVMain.SelectedItem = TVMain.Nodes(i)
Call TVMain_NodeClick(TVMain.Nodes(i))
Exit For
End If
Next i
SetMousePointer 0
Exit Sub
End If
'If UCase(LVMain.SelectedItem.SubItems(1)) = "QRY FILE" Then
If UCase(LVMain.SelectedItem.SubItems(1)) = "QRY FILE" Then
Call FrmLoadQueryFile.FrmInit(LVMain.SelectedItem.key, True)
SetMousePointer 0
Exit Sub
End If
'Call GetValue(tTypeCode, "type_code", FrmFileReg.Tag)
'Call GetValue(tFileID, "file_id", FrmFileReg.Tag)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -