Forum > General
Hide application from taskbar
(1/1)
Alex Cones:
Hi!
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;
h:=findwindow('Window','Squary');
showwindow(h, sw_hide);
--- End code ---
And ported from C++ code:
--- Code: ---Procedure TFRMMain.CreateWnd;
Var
Taskbar: ITaskbarList;
begin
inherited;
Taskbar := CreateComObject(CLSID_TaskbarList) as ITaskbarList;
Taskbar.HrInit;
Taskbar.DeleteTab(Handle);
end;
--- 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
fabienwang:
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.
Navigation
[0] Message Index