⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 task_modify.frm

📁 B6 And Windows
💻 FRM
📖 第 1 页 / 共 4 页
字号:

    SelectedNodeKey = TaskTree.SelectedItem.Key
    SelectedNodeHwnd = Mid$(TaskTree.SelectedItem.Key, 2)
    TreeMenuListItems.Enabled = IsList(SelectedNodeHwnd)
    TreeMenuShowMenus.Enabled = IsMenu(SelectedNodeHwnd)
    TreeMenuListItems.Caption = "&ListItems (" & CStr(GetListItemCount(SelectedNodeHwnd)) & ")"
    TreeMenuProperties.Caption = "&Property Bag (" & CStr(GetPropCount(SelectedNodeHwnd)) & ")"
    If TaskTree.Nodes.item(1).Selected = False And TaskTree.Nodes.item(2).Selected = False Then
        TreeMenuLaunch.Visible = True
        TreeMenuEndTask.Visible = True
        TreeMenuActivate.Visible = True
        TreeMenuShowWindow.Visible = True
      Else
        TreeMenuLaunch.Visible = False
        TreeMenuEndTask.Visible = False
        TreeMenuActivate.Visible = False
        TreeMenuShowWindow.Visible = False
    End If

End Sub

Private Sub TreeMenuActivate_Click()

    BringWindowToTop SelectedNodeHwnd

End Sub

Private Sub TreeMenuCProps_Click()

  Dim SClassName As String * 255
  Dim rLeft As Long, rTop As Long, rWidth As Long, rHeight As Long
  Dim Thread As Long, ProcID As Long
  Dim tmp As Integer

    TaskMenuID = 3
    TaskTree.Enabled = False
    LockWindowUpdate FrameCP.hwnd
    CPFlag = False
    CPLabel(0).FontSize = 10
    CPLabel(0).Alignment = vbRightJustify
    SetProps FrameCP, 0, 0, 9710, TaskTree.Height, True
    GetClassName SelectedNodeHwnd, SClassName, 255
    SetProps CPLabel(0), 360, 120, 1215, 255, True, , "Class:"
    SetProps CPText(0), 360, 1440, 6375, 285, True, True, SClassName
    Load CPLabel(1)
    SetProps CPLabel(1), 720, 240, 1095, 255, True, , "Caption:"
    Load CPText(1)
    SetProps CPText(1), 720, 1440, 6375, 285, True, (AuthorMode = False), GetText(SelectedNodeHwnd)
    Load CPLabel(2)
    SetProps CPLabel(2), 1320, 240, 1095, 255, True, , "Parent:"
    Load CPText(2)
    SetProps CPText(2), 1320, 1440, 1000, 285, True, (AuthorMode = False), GetParent(SelectedNodeHwnd)
    Load CPLabel(3)
    SetProps CPLabel(3), 1680, 120, 1215, 255, True, , "Handle:"
    Load CPText(3)
    SetProps CPText(3), 1680, 1440, 1000, 285, True, True, CStr(SelectedNodeHwnd)
    Load CPLabel(4)
    SetProps CPLabel(4), 2040, 120, 1215, 255, True, , "Instance:"
    Load CPText(4)
    SetProps CPText(4), 2040, 1440, 1000, 285, True, True, GetWndTypeVal(SelectedNodeHwnd, GWW_HINSTANCE)

    Thread = Get_Thread_ProcessID(SelectedNodeHwnd, ProcID)
    Load CPLabel(5)
    SetProps CPLabel(5), 2400, 120, 1215, 255, True, , "Thread ID:"
    Load CPText(5)
    SetProps CPText(5), 2400, 1440, 1000, 285, True, True, CStr(Thread)
    Load CPLabel(6)
    SetProps CPLabel(6), 2760, 120, 1215, 255, True, , "Process ID:"
    Load CPText(6)
    SetProps CPText(6), 2760, 1440, 1000, 285, True, True, CStr(ProcID)
    Load CPLabel(7)
    SetProps CPLabel(7), 3120, 120, 1215, 255, True, , "Window ID:"
    Load CPText(7)
    SetProps CPText(7), 3120, 1440, 1000, 285, True, True, GetWndTypeVal(SelectedNodeHwnd, GWL_ID)
    Load CPLabel(8)
    SetProps CPLabel(8), 3840, 840, 1000, 255, True, , "Pw Char:"
    Load CPText(8)
    SetProps CPText(8), 3840, 1920, 495, 285, True, (AuthorMode = False), Chr$(GetPassWordChar(SelectedNodeHwnd))
    GetControlRect SelectedNodeHwnd, rTop, rLeft, rWidth, rHeight
    Load CPLabel(9)
    SetProps CPLabel(9), 1320, 3120, 735, 255, True, , "Top:"
    Load CPText(9)
    SetProps CPText(9), 1320, 3960, 1000, 285, True, (AuthorMode = False), CStr(rTop)
    Load CPLabel(10)
    SetProps CPLabel(10), 1680, 3120, 735, 255, True, , "Left:"
    Load CPText(10)
    SetProps CPText(10), 1680, 3960, 1000, 285, True, (AuthorMode = False), CStr(rLeft)
    Load CPLabel(11)
    SetProps CPLabel(11), 2040, 3120, 735, 255, True, , "Width:"
    Load CPText(11)
    SetProps CPText(11), 2040, 3960, 1000, 285, True, (AuthorMode = False), CStr(rWidth)
    Load CPLabel(12)
    SetProps CPLabel(12), 2400, 3120, 735, 255, True, , "Height:"
    Load CPText(12)
    SetProps CPText(12), 2400, 3960, 1000, 285, True, (AuthorMode = False), CStr(rHeight)
    Load CPLabel(13)
    SetProps CPLabel(13), 3120, 2880, 1000, 255, True, , "Style:"
    Load CPText(13)
    SetProps CPText(13), 3120, 3960, 1000, 285, True, True, GetWndTypeVal(SelectedNodeHwnd, GWL_STYLE)
    Load CPLabel(14)
    SetProps CPLabel(14), 3480, 2880, 1000, 255, True, , "Ex-Style:"
    Load CPText(14)
    SetProps CPText(14), 3480, 3960, 1000, 285, True, True, GetWndTypeVal(SelectedNodeHwnd, GWL_EXSTYLE)
    Load CPLabel(15)
    SetProps CPLabel(15), 3840, 2880, 1000, 255, True, , "hDC:"
    Load CPText(15)
    SetProps CPText(15), 3840, 3960, 1000, 285, True, True, CStr(GetDC(SelectedNodeHwnd))
    Load CPLabel(16)
    SetProps CPLabel(16), 2760, 5640, 2175, 255, True, , "Menu Handle:"
    Load CPText(16)
    SetProps CPText(16), 2760, 7920, 1000, 285, True, True, GetMenu(SelectedNodeHwnd)
    Load CPLabel(17)
    SetProps CPLabel(17), 3120, 5640, 2175, 255, True, , "System Menu Handle:"
    Load CPText(17)
    SetProps CPText(17), 3120, 7920, 1000, 285, True, True, GetSystemMenu(SelectedNodeHwnd, 0)
    SetProps CPCheck(0), 1320, 6600, 1095, 255, True, (AuthorMode = False), "Visible"
    Load CPCheck(1)
    SetProps CPCheck(1), 1320, 7800, 1095, 255, True, (AuthorMode = False), "Enabled"
    Load CPLabel(18)
    SetProps CPLabel(18), 1680, 5640, 1575, 255, True, , "Window State:"
    Load CPLabel(19)
    SetProps CPLabel(19), 2160, 5640, 1575, 255, True, , "Process Priority:"
    SetProps CPCombo(0), 1680, 7320, 1575, , True, (AuthorMode = False)
    Load CPCombo(1)
    SetProps CPCombo(1), 2160, 7320, 1575, , True, (AuthorMode = False)
    SetProps CPCmd(0), FrameCP.Height - 600, 480, bWidth, bHeight, True, , "Close This Menu"
    For tmp = 0 To 17
        Select Case tmp
          Case 1, 2, 8, 9, 10, 11, 12
            SetPropsText CPText(tmp), (AuthorMode = True)
        End Select
    Next tmp
    CPCheck(0).FontSize = 10
    CPCheck(0).Value = Abs(IsWindowVisible(SelectedNodeHwnd))
    CPCheck(1).Value = Abs(IsWindowEnabled(SelectedNodeHwnd))
    CPCombo(0).Clear
    CPCombo(0).AddItem "Minimized"
    CPCombo(0).AddItem "Maximized"
    CPCombo(0).AddItem "Normal"
    CPCombo(1).Clear
    CPCombo(1).AddItem "Low"
    CPCombo(1).AddItem "Below Normal"
    CPCombo(1).AddItem "Normal"
    CPCombo(1).AddItem "Above Normal"
    CPCombo(1).AddItem "High"
    CPCombo(1).AddItem "Realtime"
    CPCombo(1).ListIndex = ConvertPriorityToComboBoxVal(GetProcessPriority(ProcID))
    CPCombo(0).ListIndex = GetWindowState(SelectedNodeHwnd)
    CPFlag = True
    LockWindowUpdate 0

End Sub

Private Sub TreeMenuEndTask_Click()

    If AuthorMode Then
  Dim IsDead As Integer

        IsDead = KillWindow(SelectedNodeHwnd)
        Select Case IsDead
          Case 0
            MsgBox "All attempts on killing the control failed."
          Case Else
            If IsDead = 1 Then
                MsgBox "The window closed successfully."
              ElseIf IsDead = 2 Then
                MsgBox "The window had to be destroyed."
              ElseIf IsDead = 3 Then
                MsgBox "The window could not be closed so the process was terminated."
            End If
            RefreshTask
        End Select
    End If

End Sub

Private Sub TreeMenuListItems_Click()

  Dim tmp As Integer

    TaskMenuID = 2
    TaskTree.Enabled = False
    LockWindowUpdate FrameLst.hwnd
    SetProps FrameLst, 0, 0, 9710, TaskTree.Height, True
    SetProps LstList, 120, 6120, 3550, FrameLst.Height - 200, True
    LstList.Clear
    CopyListToList SelectedNodeHwnd, LstList.hwnd
    SetProps LstButton(0), 360, bLeft, bWidth, bHeight, True, , "Refresh"
    Load LstButton(1)
    SetProps LstButton(1), 960, bLeft, bWidth, bHeight, True, (AuthorMode = False), "Add Item"
    Load LstButton(2)
    SetProps LstButton(2), 1560, bLeft, bWidth, bHeight, True, (AuthorMode = False), "Remove Item"
    Load LstButton(3)
    SetProps LstButton(3), FrameLst.Height - 600, bLeft, bWidth, bHeight, True, , "Close This Menu"
    SetProps LstText(0), 600, 3000, 2700, 285, True, True, LstList.ListCount
    Load LstText(1)
    SetProps LstText(1), 1400, 3000, 2700, 285, True, (AuthorMode = False), ""
    Load LstText(2)
    SetProps LstText(2), 2200, 3000, 2700, 285, True, (AuthorMode = False), ""
    SetProps LstLabel(0), 360, 3000, 2700, 225, True, , "Number Of Items"
    Load LstLabel(1)
    SetProps LstLabel(1), 1160, 3000, 2700, 225, True, , "Item Data"
    Load LstLabel(2)
    SetProps LstLabel(2), 1960, 3000, 2700, 225, True, , "List Item Text"

    For tmp = 0 To 2
        Select Case tmp
          Case 1, 2
            SetPropsText LstText(tmp), (AuthorMode = True)
        End Select
    Next tmp
    LockWindowUpdate 0

End Sub

Private Sub TreeMenuProperties_Click()

  Dim tmp As Long

    TaskMenuID = 5
    TaskTree.Enabled = False
    LockWindowUpdate FramePP.hwnd
    SetProps FramePP, 0, 0, 9710, TaskTree.Height, True
    SetProps PPList, 120, 6120, 3550, FramePP.Height - 200, True
    SetProps PPCmd(0), 360, bLeft, bWidth, bHeight, True, , "Refresh"
    Load PPCmd(1)
    SetProps PPCmd(1), 960, bLeft, bWidth, bHeight, True, (AuthorMode = False), "Add Item"
    Load PPCmd(2)
    SetProps PPCmd(2), 1560, bLeft, bWidth, bHeight, True, (AuthorMode = False), "Remove Item"
    Load PPCmd(3)
    SetProps PPCmd(3), FramePP.Height - 600, bLeft, bWidth, bHeight, True, , "Close This Menu"
    SetProps PPText(0), 600, 3000, 2700, 285, True, True, ""
    Load PPText(1)
    SetProps PPText(1), 1400, 3000, 2700, 285, True, (AuthorMode = False), ""
    Load PPText(2)
    SetProps PPText(2), 2200, 3000, 2700, 285, True, (AuthorMode = False), ""
    SetProps PPLabel(0), 360, 3000, 2700, 225, True, , "Number Of Properties"
    Load PPLabel(1)
    SetProps PPLabel(1), 1160, 3000, 2700, 225, True, , "Property Name"
    Load PPLabel(2)
    SetProps PPLabel(2), 1960, 3000, 2700, 225, True, , "Property Value"

    PPList.Clear
    GetPropList SelectedNodeHwnd
    If PPList.ListCount Then
        PPList.ListIndex = 0
    End If
    For tmp = 1 To 2
        SetPropsText PPText(tmp), (AuthorMode = True)
    Next tmp
    LockWindowUpdate 0

End Sub

Private Sub TreeMenuRefresh_Click()

  Dim n As Node

    Me.MousePointer = vbHourglass
    If SelectedNodeKey <> "" Then
        SelectedNodeKey = TaskTree.SelectedItem.Key
    End If
    If IsWindow(SelectedNodeHwnd) = 0 Then
        SelectedNodeKey = "t0"
    End If
    LockWindowUpdate TaskTree.hwnd
    TaskTree.Nodes.Clear
    LoadTaskList

    For Each n In TaskTree.Nodes
        If n.Key = SelectedNodeKey Then
            n.Selected = True
            Exit For
        End If
    Next n
    LockWindowUpdate (0)
    Me.MousePointer = vbDefault
    
End Sub

Private Sub TreeMenuShowMenus_Click()

  Dim SMnu As Long, BMnu As Long

    TaskMenuID = 4
    TaskTree.Enabled = False
    LockWindowUpdate FrameMnu.hwnd
    SetProps FrameMnu, 0, 0, 9710, TaskTree.Height, True
    SetProps MnuList, 120, 2000, 2100, FrameMnu.Height - 200, True
    SetProps MnuTree, 120, 4100, 5550, MnuList.Height, True
    SetProps MnuCmd(0), 360, bLeft, bWidth, bHeight, True, , "Refresh"
    Load MnuCmd(1)
    SetProps MnuCmd(1), 960, bLeft, bWidth, bHeight, True, (AuthorMode = False), "Remove Item"
    Load MnuCmd(2)
    SetProps MnuCmd(2), 1560, bLeft, bWidth, bHeight, True, (AuthorMode = False), "Run Item"
    Load MnuCmd(3)
    SetProps MnuCmd(3), FrameMnu.Height - 600, bLeft, bWidth, bHeight, True, , "Close This Menu"
    MnuTree.Nodes.Clear
    SMnu = GetSystemMenu(SelectedNodeHwnd, 0)
    BMnu = GetMenu(SelectedNodeHwnd)
    If SMnu Then
        MnuTree.Nodes.Add , , "SMenu", "System Menu"
        mchild MnuTree, SMnu, "SMenu", "S:"
    End If
    If BMnu Then
        MnuTree.Nodes.Add , , "BMenu", "Menu Bar"
        mchild MnuTree, BMnu, "BMenu", "B:"
    End If
    MnuTree.Nodes.item(1).Selected = True
    LockWindowUpdate 0
    FillListWithMenuItems MnuList

End Sub

Private Sub TreeMenuWindowStyles_Click()

    TaskMenuID = 1
    TaskTree.Enabled = False
    LockWindowUpdate FrameMWS.hwnd
    'i made a function to easily setup my User interface on controls
    SetProps FrameMWS, 0, 0, 9710, TaskTree.Height, True
    SetProps FrameWSX, 0, 6120, 3590, FrameMWS.Height, True
    SetProps FrameWS, 0, 2530, 3590, FrameMWS.Height, True
    SetProps WSXList, 240, 120, 3375, FrameWSX.Height - 200, True
    SetProps WSList, 240, 120, 3375, FrameWS.Height - 200, True
    SetProps WSButton(0), 360, bLeft, bWidth, bHeight, True, , "Refresh"
    Load WSButton(1)
    SetProps WSButton(1), FrameMWS.Height - 600, bLeft, bWidth, bHeight, True, , "Close This Menu"

    WSList.Clear
    WSXList.Clear
    AddToList WSList
    AddToListX WSXList
    ListGetStyles WSList, SelectedNodeHwnd
    ListGetStylesX WSXList, SelectedNodeHwnd
    LockWindowUpdate 0

End Sub

Private Sub WSButton_Click(Index As Integer)
'TaskMenuId Windows
'1 Window Styles
    Select Case Index
      Case 0 'refresh
        Unload WSButton(1)
        TreeMenuWindowStyles_Click
      Case 1 'close
        TaskMenuID = 0
        FrameMWS.Visible = False
        TaskTree.Enabled = True
        Unload WSButton(1)
    End Select

End Sub

Private Sub WSList_ItemCheck(item As Integer)

    If AuthorMode Then
        SetWS SelectedNodeHwnd, item, WSList.Selected(item)
    End If

End Sub

Private Sub WSXList_ItemCheck(item As Integer)

    If AuthorMode Then
        SetWSX SelectedNodeHwnd, item, WSXList.Selected(item)
    End If

End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -