Recent

Author Topic: How to hide program from the taskbar  (Read 3483 times)

Ivan

  • New Member
  • *
  • Posts: 10
How to hide program from the taskbar
« on: January 23, 2012, 03:59:40 pm »
I can't hide my program from the taskbar under the windows. How can i do it?
it's doesn't work:
Code: [Select]

program project1;

{$mode objfpc}{$H+}

uses
  {$IFDEF UNIX}{$IFDEF UseCThreads}
  cthreads,
  {$ENDIF}{$ENDIF}
  Interfaces, // this includes the LCL widgetset
  Forms, Unit1, LResources, Windows
  { you can add units after this };
   var
EStyle : integer;
{$IFDEF WINDOWS}{$R project1.rc}{$ENDIF}

begin
  {$I project1.lrs}
  Application.Initialize;
  EStyle:=GetWindowLong(Application., GWL_EXSTYLE);
SetWindowLong(Application.HideHint, GWL_EXSTYLE,
EStyle or WS_EX_TOOLWINDOW);
  Application.CreateForm(TForm1, Form1);
  Application.Run;
end.                                           


 

TinyPortal © 2005-2018