Results 1 to 3 of 3

Thread: [resolved] List processes in Task Manger

  1. #1

    Thread Starter
    Addicted Member Guru's Avatar
    Join Date
    May 2000
    Location
    sulking in the cupboard under the stairs
    Posts
    237

    Resolved [resolved] List processes in Task Manger

    OK, I've given up searching...

    I want to list the processes for ALL USERS in the Task Manager



    Thanks
    Last edited by Guru; Nov 1st, 2005 at 08:46 AM. Reason: resolved
    Another light-hearted post from Guru

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: List processes in Task Manger

    This will give you a list of all current processes. Is this what you want?
    VB Code:
    1. 'in a module
    2. Public Declare Function IsWindowVisible Lib "user32" (ByVal hwnd As Long) As Long
    3. Public Declare Function EnumWindows Lib "user32" (ByVal lpEnumFunc As Long, ByVal lParam As Long) As Long
    4. Public Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long
    5. Public Const MAX_LEN = 260
    6. Public Function EnumWinProc(ByVal hwnd As Long, ByVal lParam As Long) As Long
    7.     Dim lRet As Long
    8.     Dim strBuffer As String
    9.    
    10.     If IsWindowVisible(hwnd) Then
    11.         strBuffer = Space(MAX_LEN)
    12.         lRet = GetWindowText(hwnd, strBuffer, Len(strBuffer))
    13.         If lRet Then
    14.             Form1.List1.AddItem Left(strBuffer & "  " & hwnd, lRet)
    15.         End If
    16.     End If
    17.    
    18.     EnumWinProc = 1
    19. End Function
    20.  
    21. 'on a form
    22. Private Sub Command1_Click()
    23. Call EnumWindows(AddressOf EnumWinProc, 0)
    24. End Sub

  3. #3

    Thread Starter
    Addicted Member Guru's Avatar
    Join Date
    May 2000
    Location
    sulking in the cupboard under the stairs
    Posts
    237

    Re: List processes in Task Manger

    Quote Originally Posted by Hack
    This will give you a list of all current processes. Is this what you want?
    Hmm... not sure because it didn't work

    It pointed me in teh rigtdirection though and I found this:
    http://www.vbforums.com/showthread.php?t=341153

    Which is EXACTLY what I want

    Thanks!
    Another light-hearted post from Guru

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width