📄 task_modify.frm
字号:
ElseIf IsWindowVisible(cur) = 0 Then
Nodx.ForeColor = RGB(127, 127, 127)
End If
Next X
SortNodes TaskTree
TaskTree.Nodes(1).Expanded = True
'clear some mem...
Set Nodx = Nothing
Me.MousePointer = vbDefault
End Sub
Private Sub LstButton_Click(Index As Integer)
'TaskMenuId Windows
'2 List Box Propertys
Dim X As Integer
Select Case Index
Case 0 'Refresh
For X = 1 To 2
Unload LstButton(X)
Unload LstText(X)
Unload LstLabel(X)
Next X
Unload LstButton(3)
TreeMenuListItems_Click
Case 1 'Add item
If AuthorMode Then
If LstText(1) = "" Then
LstText(1) = "0"
End If
If LstText(2) = "" Then
LstText(2) = " "
End If
LstAddItem LstList.hwnd, SelectedNodeHwnd, LstText(2), CLng(LstText(1))
End If
Case 2 'Remove item
If AuthorMode Then
If LstList.ListIndex > -1 Then
LstRemoveItem LstList.hwnd, SelectedNodeHwnd, LstList.ListIndex
End If
End If
Case 3 'Close Menu
TaskMenuID = 0
FrameLst.Visible = False
TaskTree.Enabled = True
For X = 1 To 2
Unload LstButton(X)
Unload LstText(X)
Unload LstLabel(X)
Next X
Unload LstButton(3)
End Select
LstText(0).Text = LstList.ListCount
End Sub
Private Sub LstList_Click()
LstText(0).Text = LstList.ListCount
LstText(2).Text = LstList.List(LstList.ListIndex)
LstText(1).Text = LstList.ItemData(LstList.ListIndex)
End Sub
Private Sub LstText_GotFocus(Index As Integer)
If AuthorMode Then
Select Case Index
Case 1, 2
SetPropsText LstText(Index), True, vbBlue
End Select
End If
End Sub
Private Sub LstText_KeyPress(Index As Integer, KeyAscii As Integer)
Dim LI As Long
If AuthorMode Then
If KeyAscii = 13 Then
LI = LstList.ListIndex
If LI > -1 Then
LstReplaceItem LstList.hwnd, SelectedNodeHwnd, LI, LstText(2).Text, Val(LstText(1).Text)
End If
End If
End If
End Sub
Private Sub LstText_LostFocus(Index As Integer)
If AuthorMode Then
Select Case Index
Case 1, 2
SetPropsText LstText(Index), True, vbBlack
End Select
End If
End Sub
Private Sub MnuAbout_Click()
MsgBox "Programmed By Billy Conner 2001", vbOKOnly, "About"
End Sub
Private Sub MnuAOT_Click()
If MnuAOT.Checked = 0 Then
Me.AlwaysOnTop = True
Else
Me.AlwaysOnTop = False
End If
End Sub
Private Sub MnuCmd_Click(Index As Integer)
'TaskMenuId Windows
'4 Menu's
Dim dKey As String
Dim tmp As Integer
Dim st As Variant
dKey = MnuTree.SelectedItem.Key
st = Split(dKey, ":")
Select Case Index
Case 0 'refresh
TaskTree.Enabled = True
For tmp = 1 To 3
Unload MnuCmd(tmp)
Next tmp
TreeMenuShowMenus_Click
Case 1 'removeitem
If AuthorMode Then
If Len(st(0)) = 1 Then
RemoveMenuItem SelectedNodeHwnd, st(0) = "S", CLng(st(1))
MnuTree.Nodes.Remove (MnuTree.SelectedItem.Key)
End If
End If
Case 2 'Run Item
If AuthorMode Then
If UBound(st) = 3 Then
RunMenuItem SelectedNodeHwnd, CLng(st(1))
End If
End If
Case 3 'Close Menu
TaskMenuID = 0
FrameMnu.Visible = False
TaskTree.Enabled = True
For tmp = 1 To 3
Unload MnuCmd(tmp)
Next tmp
End Select
End Sub
Private Sub mnuFindByExec_Click()
mnuFindByFindAgain.Visible = FindText(First, TaskTree, FINDBY_EXECUTABLE)
End Sub
Private Sub mnuFindByFindAgain_Click()
mnuFindByFindAgain.Visible = FindText(FindNext, TaskTree)
End Sub
Private Sub mnuFindByHandle_Click()
mnuFindByFindAgain.Visible = FindText(First, TaskTree, FINDBY_HANDLE)
End Sub
Private Sub mnuFindByText_Click()
mnuFindByFindAgain.Visible = FindText(First, TaskTree, FINDBY_TEXT)
End Sub
Private Sub mnuFindObj_Click()
SetTimer Me.hwnd, Evnt_Countdown, 1000, AddressOf Proc_FHFMO_CountDown
SetTimer Me.hwnd, Evnt_FindHwndFromMouseOver, 100, AddressOf Proc_FindHwndFromMouseOver
End Sub
Private Sub Timer1_Timer()
End Sub
Private Sub mnuSecretOption_Click()
MsgBox ":)"
End Sub
Private Sub MnuVisibleOnly_Click()
End Sub
Private Sub TreeMenuLaunch_Click()
Dim FilePar As String
Dim Thread As Long, ProcID As Long
If Dir(LaunchFile) <> "" Then
Select Case LaunchPar
Case 0 'none
'do nothing
Case 1 'Handle
FilePar = CStr(SelectedNodeHwnd)
Case 2 'Parent Handle
FilePar = CStr(GetParent(SelectedNodeHwnd))
Case 3 'Process ID
Thread = Get_Thread_ProcessID(SelectedNodeHwnd, ProcID)
FilePar = CStr(ProcID)
Case 4 'Exec File
FilePar = GetExeFromHandle(SelectedNodeHwnd)
End Select
ShellExecute Me.hwnd, "open", LaunchFile, FilePar, App.Path, vbNormalFocus
End If
End Sub
Private Sub MnuLegend_Click()
'Load Legend
AssignParent Legend.hwnd, TaskTree.hwnd
Legend.Move TaskTree.Width - Legend.Width - 300, TaskTree.Top
Legend.Show
End Sub
Private Sub mnuMoreOptions_Click()
TaskMenuID = 6
Load Options
AssignParent Options.hwnd, Me.hwnd
Options.Move TaskTree.Left, TaskTree.Top, TaskTree.Width, TaskTree.Height
Options.Show
End Sub
Private Sub MnuTree_NodeClick(ByVal Node As MSComctlLib.Node)
Dim ms As Long
Dim dKey As String
Dim st As Variant
dKey = MnuTree.SelectedItem.Key
st = Split(dKey, ":")
If Left$(st(0), 1) = "S" Then
MnuCmd(2).Enabled = False
Else
MnuCmd(2).Enabled = True
End If
If UBound(st) = 3 Then
ms = CLng(st(2))
CheckMenuStats MnuList, ms
End If
End Sub
Private Sub PPCmd_Click(Index As Integer)
'TaskMenuId Windows
'5 Property Bag
Dim tmp As Integer
Select Case Index
Case 0 'Refresh
For tmp = 1 To 2
Unload PPCmd(tmp)
Unload PPText(tmp)
Unload PPLabel(tmp)
Next tmp
Unload PPCmd(3)
TreeMenuProperties_Click
Case 1 'Add Item
If AuthorMode Then
If IsStringNumeric(PPText(2).Text) = False Then
PPText(2).Text = "0"
End If
Add_Prop SelectedNodeHwnd, PPText(1), PPText(2)
End If
Case 2 'Remove Item
If AuthorMode Then
Delete_Prop SelectedNodeHwnd, PPText(1)
End If
Case 3 'Close Menu
TaskMenuID = 0
FramePP.Visible = False
TaskTree.Enabled = True
For tmp = 1 To 2
Unload PPCmd(tmp)
Unload PPText(tmp)
Unload PPLabel(tmp)
Next tmp
Unload PPCmd(3)
End Select
End Sub
Private Sub PPList_Click()
PPText(1).Text = PPList.List(PPList.ListIndex)
PPText(2).Text = Get_Prop(SelectedNodeHwnd, PPText(1).Text)
End Sub
Private Sub PPText_GotFocus(Index As Integer)
If AuthorMode Then
Select Case Index
Case 1, 2
SetPropsText PPText(Index), True, vbBlue
End Select
End If
End Sub
Private Sub PPText_KeyPress(Index As Integer, KeyAscii As Integer)
If AuthorMode Then
If Index <> 0 Then
If KeyAscii = 13 Then
If IsStringNumeric(PPText(2).Text) = False Then
PPText(2).Text = "0"
End If
Add_Prop SelectedNodeHwnd, PPText(1), PPText(2)
End If
End If
End If
End Sub
Private Sub PPText_LostFocus(Index As Integer)
If AuthorMode Then
Select Case Index
Case 1, 2
SetPropsText PPText(Index), True, vbBlack
End Select
End If
End Sub
Public Sub RefreshTask()
TreeMenuRefresh_Click
End Sub
Private Sub SortNodes(DaTree As TreeView)
Dim n As Node
For Each n In DaTree.Nodes
n.Sorted = True
Next n
End Sub
Private Sub TaskTree_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbRightButton Then
PopupMenu TaskMenu_Items
End If
End Sub
Private Sub TaskTree_NodeClick(ByVal Node As MSComctlLib.Node)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -