Thanks
I'm not familiar with any column named "session ID" in Task Manager. Do
you mean the process ID? That's easy to get: GetCurrentProcessID.
--
Rob
No, I really do mean the session ID :) Run the Windows Task Manager, go
to the main menu and select View -> Select Columns..., and you can see
Session ID in the lower left (assuming you are using Windows XP it is
between I/O Read Bytes and User Name).
Thanks
var
SessionId: DWORD;
begin
if ProcessIdToSessionId(GetCurrentProcessId, SessionId) then
Caption := IntToStr(SessionId);
end;
Perfect, thanks.