Search results for 'ShowWindow'. 2 post(s) found.

  1. 2007/09/25 How to remove your application from TaskBar
  2. 2007/08/25 How Do I Remove The Application Icon From The Taskbar?
2007/09/25 14:11

How to remove your application from TaskBar


If you need to hide your application from the Windows TaskBar, you can use the following trick:

procedure TForm1.FormCreate(Sender: TObject) ;
begin
   ShowWindow(Application.Handle, SW_HIDE) ;
   SetWindowLong(Application.Handle, GWL_EXSTYLE,
     getWindowLong(Application.Handle, GWL_EXSTYLE) or
     WS_EX_TOOLWINDOW) ;
   ShowWindow(Application.Handle, SW_SHOW) ;
end;
Trackback 3 Comment 0

Trackback : Cannot send a trackbact to this post.

  1. Subject different money making ideas

    Tracked from moneyideas 2010/01/28 23:46 delete

    moneyideas

  2. Subject different money making ideas

    Tracked from moneyideas 2010/01/29 08:18 delete

    moneyideas

  3. Subject different money making ideas

    Tracked from moneyideas 2010/01/31 16:41 delete

    moneyideas

2007/08/25 10:13

How Do I Remove The Application Icon From The Taskbar?


To remove the icon from the Taskbar, you need to call a Windows API call:

BOOL ShowWindow(HWND hwnd,int nCmdShow);

Delphi makes it very easy to use this command. All you need to do is supply the Application.handle and SW_HIDE to remove the icon from the Taskbar.

To display the icon on the Taskbar use SW_SHOW in your ShowWindow parameter.

Both examples are shown in the source below.


procedure TForm1.Button1Click(Sender: TObject);
begin
  ShowWindow (Application.Handle, SW_HIDE);
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
  ShowWindow (Application.Handle, SW_SHOW);
end;

Trackback 3 Comment 0

Trackback : Cannot send a trackbact to this post.

  1. Subject different money making ideas

    Tracked from moneyideas 2010/01/29 02:14 delete

    moneyideas

  2. Subject different money making ideas

    Tracked from moneyideas 2010/01/29 10:22 delete

    moneyideas

  3. Subject different money making ideas

    Tracked from moneyideas 2010/01/31 16:43 delete

    moneyideas