用VB如何打开进程列表

来源:百度知道 编辑:UC知道 时间:2024/06/01 03:22:58
请教如何用VB如何打开进程列表
是用COMMAND的CLICK事件
谢谢
谢谢你,我知道如何打开任务管理器,我的意思是打开一个单纯的进程列表框,可以显示所有映象及其所在目标位置.
谢谢,提高10分悬赏

shell "taskmgr.exe",1

你说是这样打开?

sub command1_click()
shell "taskmgr.exe",1
end sub

====================

//提高10分悬赏

10分很多吗?

=================

拿点陈年旧货出来吧

第一段,可以取得当前进程列表

'模块
Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long

'该函数是EnumWindows的回调函数,EnumWindows函数将遍历的窗口句柄传递到hwnd参数中
Function EnumWindowsProc(ByVal hwnd As Long, ByVal lParam As Long) As Long
Dim astr As String * 256
Dim l As Long

l = GetWindowText(hwnd, astr, Len(astr))
If InStr(astr, " ") > 1 Then
Form1.List1.AddItem astr
End If
EnumWindowsProc = True
End Function

'窗体
Private Declare Function EnumWindows Lib "user32" (ByVal lpEnumFunc As Long, ByVal lParam As Lo