嘿嘿,如果在window nt/2000下可不是那么简单。给你一坨:<br>unit Unit1;<br><br>interface<br><br>uses<br> Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,<br> Dialogs, StdCtrls, TlHelp32, ImgList, ExtCtrls, jpeg;<br><br>type<br> TForm1 = class(TForm)<br> Timer1: TTimer;<br> Image2: TImage;<br> Panel1: TPanel;<br> ListBox1: TListBox;<br> Panel2: TPanel;<br> procedure FormCreate(Sender: TObject);<br> procedure Timer1Timer(Sender: TObject);<br> procedure Image2DblClick(Sender: TObject);<br> procedure FormShow(Sender: TObject);<br> private<br> { Private declarations }<br> public<br> { Public declarations }<br> end;<br><br>var<br> Form1: TForm1;<br><br>implementation<br><br>{$R *.dfm}<br><br>procedure TForm1.FormCreate(Sender: TObject);<br> var lppe:TProcessEntry32;<br> found:boolean;<br> hand:THandle;<br>begin<br> Hand:=CreateToolhelp32Snapshot(TH32CS_SNAPALL,0);<br> found:=Process32First(Hand,lppe);<br> while found do<br> begin<br> ListBox1.Items.Add(lppe.szExeFile);<br> found:=Process32Next(Hand,lppe);<br> end;<br>end;<br><br>procedure TForm1.Timer1Timer(Sender: TObject);<br> var lppe:TProcessEntry32;<br> found:boolean;<br> hand:THandle;<br>begin<br> ListBox1.Clear;<br> Hand:=CreateToolhelp32Snapshot(TH32CS_SNAPALL,0);<br> found:=Process32First(Hand,lppe);<br> while found do<br> begin<br> ListBox1.items.Add(' '+strpas(lppe.szExeFile));<br> found:=Process32Next(hand,lppe);<br> end;<br>end;<br><br>procedure TForm1.Image2DblClick(Sender: TObject);<br>begin<br> Close;<br>end;<br><br>procedure TForm1.FormShow(Sender: TObject);<br>begin<br> Form1.BringToFront;<br>end;<br><br>end.