I have this code:
procedure TForm1.Button1Click(Sender: TObject);
var
MyHandle: THandle;
begin
MyHandle:=FindWindow(nil, 'Delphi');
SendMessage(MyHandle, WM_CLOSE, 0, 0);
// Here will be a message like ' title found and it's test.exe that has 'Delphi' Title
end;
For example, it is test.exe that is the process that has the 'Delphi' title, and I want to get the EXE file name of that process by using the window handle. Is that possible? If so, may I have some reference for doing it?