Forum > General

Hide application from taskbar


Alex Cones:

I have tried many different methods, but...

My methods:

--- Code: ---// SetWindowLong(wnd, GWL_EXSTYLE, WS_EX_TOOLWINDOW);
//  ShowWindow(TWin32WidgetSet(WidgetSet).AppHandle, SW_HIDE);
//  ShowWindow(FRMMain.Handle, SW_HIDE);
//  FRMMain.ShowInTaskBar := stNever;
  showwindow(h, sw_hide);

--- End code ---
And ported from C++ code:

--- Code: ---Procedure TFRMMain.CreateWnd;
  Taskbar: ITaskbarList;

  Taskbar := CreateComObject(CLSID_TaskbarList) as ITaskbarList;

--- End code ---

Also I checked FRMMain.ShowInTaskbar in Never...

What to do, for hide it?

P.S. Also my form have
1) bsNone formstyle
2) Form have

--- Code: ---With FRMMain Do
    SetWindowPos(Handle, HWND_TOPMOST, Left, Top, Width, Height, SWP_SHOWWINDOW);

--- End code ---
In Almost every OnPaint.
3) Form have next parameters:

--- Code: ---SetWindowLong(FRMMain.Handle, GWL_EXSTYLE,
   GetWindowLong(FRMMain.Handle, GWL_EXSTYLE) or WS_EX_LAYERED);
  SetLayeredWindowAttributes(FRMMain.Handle, $FF00FF, 0, LWA_COLORKEY);

--- End code ---
- For $FF00FF transparent

in TFrmMain.Create, add the following code:

FRMMain.ShowInTaskbar := false;

or simply define it in the design of the form

Alex Cones:
Thanx, I just reinstall Lazarus, and it all works.

Thank you anyway.


[0] Message Index

Go to full version