Recent

Author Topic: Position an External Application Started with TProcess  (Read 552 times)

Weitentaaal

  • Hero Member
  • *****
  • Posts: 547
Position an External Application Started with TProcess
« on: March 01, 2024, 09:55:42 am »
Hello,

how do i ste the Position of an external Process.
This is how i start it:

Code: Pascal  [Select][+][-]
  1. Bb:= TProcess.Create(Nil);
  2. try
  3.     Bb.Executable:=(PathToFile);
  4.     Bb.Options:= [poWaitOnExit];
  5.     Bb.Execute;
  6. finally
  7.     Bb.Free;
  8.  end;
  9.  


i checked "https://www.freepascal.org/docs-html/fcl/process/tprocess.html" but was not able to find anything useful.
I Need it beacause the external programm is spread across my 2 monitors and i cant understand why.
I need it 2 times actually and the second tyme the application is in the Left bottom Corner.

Edit: tried using TProcess.WindowLeft and TProcess.WindowRect but i can't access those properties.
« Last Edit: March 01, 2024, 10:02:46 am by Weitentaaal »

PascalDragon

  • Hero Member
  • *****
  • Posts: 5750
  • Compiler Developer
Re: Position an External Application Started with TProcess
« Reply #1 on: March 01, 2024, 08:39:23 pm »
Edit: tried using TProcess.WindowLeft and TProcess.WindowRect but i can't access those properties.

What do you mean with “i can't access those properties”? Cause these are published and public respectively.

Also are you trying this on Windows? Cause that's the only platform that supports this...

 

TinyPortal © 2005-2018