Hi,
using the Windows
API you can obtain the file path of a process.
Then, you can extract the icon from it.
To get the path, you'll need the so-called Process ID (DWORD type).
Delphi Get Process ID
Then, the TModuleEntry32 will probably help you further.
Delphi Get Process File Path
To get the icon of a file, you may use something like
this.