Results 1 to 3 of 3

Thread: How to write a program like Taskmanager ??

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Nov 2002
    Posts
    19

    How to write a program like Taskmanager ??

    I asked this qustion because i wanna write a progam to Crack an intenet cafe program...lol...so i mustnt pay...he..he..any know where there is a progam like Taskmanager, we can entask any program by using it ?
    Thank u !!!

  2. #2
    Frenzied Member KayJay's Avatar
    Join Date
    Jul 2001
    Location
    Chennai
    Posts
    1,849
    One sure shot wayy
    .
    .
    .
    .

    .
    .

    .
    .

    .
    .
    .

    ..

    .
    .

    .
    .
    .
    .

    .
    ..

    .
    .
    .
    .

    .
    .
    .
    .
    .
    .

    ..
    .
    .
    .

    ..

    .
    .
    .

    ..

    .
    .
    .
    .
    .
    .
    .

    ..

    .

    .
    .
    .
    .

    .
    .

    .

    .
    .
    .

    SEARCH these boards. The question has been asked a number of times and answered as well.

    "Brothers, you asked for it."
    ...Francisco Domingo Carlos Andres Sebastian D'Anconia

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

    This should get you started...modify as required

    VB Code:
    1. 'in a module
    2.  
    3. Public Declare Function IsWindowVisible Lib "user32" (ByVal hwnd As Long) As Long
    4. Public Declare Function EnumWindows Lib "user32" (ByVal lpEnumFunc As Long, ByVal lParam As Long) As Long
    5. Public Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long
    6. Public Const MAX_LEN = 260
    7.  
    8. Public Function EnumWinProc(ByVal hwnd As Long, ByVal lParam As Long) As Long
    9.     Dim lRet As Long
    10.     Dim strBuffer As String
    11.    
    12.     If IsWindowVisible(hwnd) Then
    13.         strBuffer = Space(MAX_LEN)
    14.         lRet = GetWindowText(hwnd, strBuffer, Len(strBuffer))
    15.         If lRet Then
    16.             frmProcesses.List1.AddItem Left(strBuffer & "  " & hwnd, lRet)
    17.         End If
    18.     End If
    19.    
    20.     EnumWinProc = 1
    21. End Function
    22.  
    23. 'on a form with a ListBox (mine is called frmProcesses)
    24. Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
    25. Private Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
    26. Private Declare Function Shell_NotifyIcon Lib "shell32" Alias "Shell_NotifyIconA" (ByVal dwMessage As Long, pnid As NOTIFYICONDATA) As Boolean
    27.  
    28. Private Type NOTIFYICONDATA
    29.     cbSize As Long
    30.     hwnd As Long
    31.     uId As Long
    32.     uFlags As Long
    33.     ucallbackMessage As Long
    34.     hIcon As Long
    35.     szTip As String * 64
    36. End Type
    37.  
    38. Private Const NIM_ADD = &H0
    39. Private Const NIM_MODIFY = &H1
    40. Private Const NIM_DELETE = &H2
    41. Private Const WM_MOUSEMOVE = &H200
    42. Private Const NIF_MESSAGE = &H1
    43. Private Const NIF_ICON = &H2
    44. Private Const NIF_TIP = &H4
    45. Private Const WM_LBUTTONDBLCLK = &H203
    46. Private Const WM_LBUTTONDOWN = &H201
    47. Private Const WM_LBUTTONUP = &H202
    48. Private Const WM_RBUTTONDBLCLK = &H206
    49. Private Const WM_RBUTTONDOWN = &H204
    50. Private Const WM_RBUTTONUP = &H205
    51.  
    52. Private Const WM_CLOSE = &H10
    53. Private Const WM_QUIT = &H12
    54.  
    55. Private SysTray As NOTIFYICONDATA
    56.  
    57. Private Sub StartInSysTray()
    58.     SysTray.cbSize = Len(SysTray)
    59.     SysTray.hwnd = Picture1.hwnd
    60.     SysTray.uId = 1&
    61.     SysTray.uFlags = NIF_ICON Or NIF_TIP Or NIF_MESSAGE
    62.     SysTray.ucallbackMessage = WM_MOUSEMOVE
    63.     SysTray.hIcon = Me.Icon
    64.     SysTray.szTip = "&My Task Manager" & Chr$(0)
    65.     Shell_NotifyIcon NIM_ADD, SysTray
    66.     Me.Hide
    67.     App.TaskVisible = False
    68. End Sub
    69.  
    70. Private Sub LoadProcesses()
    71. Call EnumWindows(AddressOf EnumWinProc, 0)
    72. End Sub
    73.  
    74. Private Sub Form_Load()
    75. LoadProcesses
    76. StartInSysTray
    77. End Sub
    78.  
    79. Private Sub List1_DblClick()
    80. Dim CloseIt As Long
    81. CloseIt = FindWindow(vbNullString, List1.List(List1.ListIndex))
    82. PostMessage CloseIt, WM_CLOSE, CLng(0), CLng(0)
    83. List1.Clear
    84. LoadProcesses
    85. End Sub

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