Link to home
Start Free TrialLog in
Avatar of lalala
lalala

asked on

grabtext

how can i build in Delphi an app that get every runing aplication em send it to a editbox?
Avatar of rpetruni
rpetruni

Pls be more specific, i don't untherstand what you wannt...
 do you wannt to count how many times your app is beein started?
Pls be more specific, i don't untherstand what you wannt...
 do you wannt to count how many times your app is beein started?
ASKER CERTIFIED SOLUTION
Avatar of viktornet
viktornet
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Viktor, This will only get Delphi applications!

The code below will put all names of all running processes (applications) into a treeview...

Cheers,

Raymond.

implementation

uses
  tlHelp32;

{$R *.DFM}

procedure TForm1.Button1Click(Sender: TObject);
var
  hSnapshot : THandle;
  pe : TPROCESSENTRY32;
begin
  hSnapshot := CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
  if hSnapshot = THandle(-1) then
    Exit;

  pe.dwSize := sizeof(pe);
  if Process32First(hSnapshot, pe) then
    repeat
      TreeView1.Items.AddChild(TreeView1.items[0], pe.szExeFile);
    until not Process32Next(hSnapshot, pe);

  CloseHandle(hSnapshot);
end;

end.
lalala: Have you used an answer posted here? If so which one?

Cheers,

Raymond.
Raymond, you going through all your proposed answers/comments? ;-)