|
-
Jul 21st, 2005, 10:18 AM
#1
Thread Starter
Lively Member
[Delphi] Getting Running processes into a List Box and Kill Selected ??
Hello every one!
I don't know if i can ask questions in this Forum..But i will any way
- I want to ask this:
I have 1 Listbox and 2 Buttons
The first button get running processes into a list box and the other terminate selected process!
Last edited by NoteMe; Jul 22nd, 2005 at 10:34 AM.
-
Jul 21st, 2005, 10:57 AM
#2
Re: Getting Running processes into a List Box and Kill Selected [Delphi]??
This is not the proper place for a question, but I can move it to where it needs to go. My question is: Is this a Delphi specific question? If not, what language are you referring to?
Thanks, and I'll move this as appropriate.
-
Jul 21st, 2005, 11:18 AM
#3
Thread Starter
Lively Member
Re: Getting Running processes into a List Box and Kill Selected [Delphi]??
 Originally Posted by Hack
This is not the proper place for a question, but I can move it to where it needs to go. My question is: Is this a Delphi specific question? If not, what language are you referring to?
Thanks, and I'll move this as appropriate. 
Yes my question is how can i make a processes nmanager in Delphi...
Sorry if i post the question in a Code Bank forum..But there is no other Forum to post Delphi questions
-
Jul 21st, 2005, 01:19 PM
#4
Re: Getting Running processes into a List Box and Kill Selected [Delphi]??
Moved from CodeBank - Other
No, there isn't a Delphi specific forum section. The only other place that I believe this would be appropriate is in General Developer.
-
Jul 21st, 2005, 03:28 PM
#5
Supreme User
Re: Getting Running processes into a List Box and Kill Selected [Delphi]??
You may populate the listbox with the win32 process list, by using:
uses TLHelp32
procedure TForm1.Button1Click(Sender: TObject);
var
MyHandle: THandle;
Struct: TProcessEntry32;
begin
try
MyHandle:=CreateToolHelp32SnapShot(TH32CS_SNAPPROCESS, 0);
Struct.dwSize:=Sizeof(TProcessEntry32);
if Process32First(MyHandle, Struct) then
ListBox1.Items.Add(Struct.szExeFile);
while Process32Next(MyHandle, Struct) do
ListBox1.Items.Add(Struct.szExeFile);
except on exception do
ShowMessage('Error showing process list');
end
end;
Im guessing to kill the process you desire, simply call the Kill method on the selected listbox item
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|