delphifindwindow

Sending a restore message from FM to another Application


I was provided some great help in finding if a window existed in FM.

Now I need to know how to restore that window , if it does exists.

thanks

 function WindowExists(const TitleName: string): Boolean;
begin
   Result := Winapi.Windows.FindWindow(nil, PChar(TitleName)) <> 0;
end;

Solution

  • Call ShowWindow passing the window handle and the SW_RESTORE flag.