Cant hide window from taskbar when executing application created with Lazarus lazarus / 34-Windows ---------------------------------------------------------------------- MaartenJB · 2021-08-16 11:54 Hi, I want to launch an application with TProcess made with Lazarus, but it won't let me hide the application. If I do the same with for example mspaint.exe it works fine: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i uses ..., process; var  aProcess: TProcess;begin   aProcess := TProcess.Create(nil);  try     if (CheckBox1.Checked)    then aProcess.CommandLine := 'mspaint.exe'           // <--- Works    else aProcess.CommandLine := 'C:\Temp\project1.exe';  // <--- Doesnt Work  ( Vanilla Lazarus application )     aProcess.CurrentDirectory:= ExtractFilePath(aProcess.CommandLine);    aProcess.Options := aProcess.Options - [poWaitOnExit];    aProcess.ShowWindow:=swoHIDE;   // <---  This should hide the application    aProcess.Execute;  finally    aProcess.Free;  end;end; ---------------------------------------------------------------------- lucamar · 2021-08-16 12:53 Since you seem to be in Windows, try with: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i     {... etc ...}    Exclude(aProcess.Options, poWaitOnExit); {== aProcess.Options - [poWaitOnExit];}    Include(aProcess.Options, poNoConsole);    aProcess.ShowWindow:=swoHIDE;    {... etc ...} Note, though, that some programs don't like to be run hidden, so they take steps to prevent it in their own initialization. There's nothing you can do about it. ---------------------------------------------------------------------- winni · 2021-08-16 14:54 Hi! For Windows only there is the  property TPROCESS.ShowWindow: Try the option swoHide. Winni ---------------------------------------------------------------------- lucamar · 2021-08-16 14:58 Quote from: winni on August 16, 2021, 04:54:47 pmFor Windows only there is the  property TPROCESS.ShowWindow: Try the option swoHide. That was already in the OP's oiginal code. It's in fact what got him baffled: that it works with mspaint.exe but not with (his?) testmon.exe Just saying ... ---------------------------------------------------------------------- winni · 2021-08-16 15:25 Hi! What ist testmon.exe? If it is your own code: Does it got wsMaximized or fsStayOnTop? Quote from: lucamar on August 16, 2021, 04:58:49 pm That was already in the OP's oiginal code. Sorry. Lack of concentration. Just looking in the airspace over Afghanistan. Turkish Airforce just flew in it with an A400M (TUAF580 ) Winni ---------------------------------------------------------------------- MaartenJB · 2021-08-17 06:59 Thanks for responding @lucamar, I've tried it your suggestion, but it still appears in the taskbar. @winni, testmon.exe is just a blanco/vanilla Lazarus application, i've changed the name to project1.exe to make it more clear.