Results 1 to 2 of 2

Thread: how to find out how ot find out what running but not shown in crtl alt Del Can Some??

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jul 1999
    Posts
    219

    Post

    how to find out how ot find out what running but not shown in crtl alt Del Can Someone Help Me On THis And to Also Find out WHat running In THe Memory?

  2. #2
    Hyperactive Member razzaj's Avatar
    Join Date
    Oct 1999
    Location
    jounieh
    Posts
    261

    Post

    Add the following Constant and Declare statements to the General Declarations section of Form1:

    Private Declare Function GetWindow Lib "user32" _
    (ByVal hwnd As Long, ByVal wCmd As Long) As Long
    Private Declare Function GetParent Lib "user32" _
    (ByVal hwnd As Long) As Long
    Private Declare Function GetWindowTextLength Lib _
    "user32" Alias "GetWindowTextLengthA" (ByVal hwnd As Long) As Long
    Private Declare Function GetWindowText Lib "user32" _
    Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal _
    lpString As String, ByVal cch As Long) As Long
    Const GW_HWNDFIRST = 0
    Const GW_HWNDNEXT = 2
    Add a Command Button control to Form1. Command1 is created by default.

    Add the following code to the Click event for Command1:

    Private Sub Command1_Click()
    LoadTaskList
    End Sub
    Add a List Box control to Form1. List1 is created by default.

    Create a new subroutine called LoadTaskList. Add the following code to this subroutine:

    Sub LoadTaskList()
    Dim CurrWnd As Long
    Dim Length As Long
    Dim TaskName As String
    Dim Parent As Long

    List1.Clear
    CurrWnd = GetWindow(Form1.hwnd, GW_HWNDFIRST)

    While CurrWnd <> 0
    Parent = GetParent(CurrWnd)
    Length = GetWindowTextLength(CurrWnd)
    TaskName = Space$(Length + 1)
    Length = GetWindowText(CurrWnd, TaskName, Length + 1)
    TaskName = Left$(TaskName, Len(TaskName) - 1)

    If Length > 0 Then
    If TaskName <> Me.Caption Then
    List1.AddItem TaskName
    End If
    End If
    CurrWnd = GetWindow(CurrWnd, GW_HWNDNEXT)
    DoEvents

    Wend

    End Sub


    ------------------
    - regards -
    - razzaj -

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