Recent

Author Topic: never show taskbar item for the form ???  (Read 10907 times)

abmservice

  • Jr. Member
  • **
  • Posts: 69
never show taskbar item for the form ???
« on: October 17, 2010, 07:23:20 pm »
I am writing a simple program in windows at Lazarus and I want to hide applications from taskbar.
ShowInTaskbar: = stNever unfortunately does not work
« Last Edit: October 17, 2010, 07:28:12 pm by abmservice »

Trunkles

  • New Member
  • *
  • Posts: 32
  • Making your screen look tatty.
Re: never show taskbar item for the form ???
« Reply #1 on: January 08, 2011, 12:43:24 am »
I'm having the same problem with version 0.9.28.2 beta, which I believe is the latest release.
I'm setting the value ShowInTaskBar to StNever at design time but, when I run it, there it is, large as life, just to the right of the quick launch bar.

Argh!

Simon.
Author of crap (and not so crap) software for over 30 years.

typo

  • Hero Member
  • *****
  • Posts: 3051
Re: never show taskbar item for the form ???
« Reply #2 on: January 08, 2011, 12:55:13 am »
This works for me:

Code: [Select]
var
    h, p :thandle;
begin
    h := FindWindow('Window', PChar(Application.Title));
    p := GetParent(h);
    if h = Self.Handle then
    repeat
      h := FindWindowEx(p, h, 'Window', PChar(Application.Title));
    until (h = 0)  or  (h <> Self.Handle);
    ShowWindow(h, 0);
end; 

typo

  • Hero Member
  • *****
  • Posts: 3051

Ivan

  • New Member
  • *
  • Posts: 10
Re: never show taskbar item for the form ???
« Reply #4 on: January 23, 2012, 06:42:49 pm »
Quote
Code: [Select]
var
    h, p :thandle;
begin
    h := FindWindow('Window', PChar(Application.Title));
    p := GetParent(h);
    if h = Self.Handle then
    repeat
      h := FindWindowEx(p, h, 'Window', PChar(Application.Title));
    until (h = 0)  or  (h <> Self.Handle);
    ShowWindow(h, 0);
end; 
where must i put it?

typo

  • Hero Member
  • *****
  • Posts: 3051
Re: never show taskbar item for the form ???
« Reply #5 on: January 23, 2012, 06:51:48 pm »
The form must be visible, for example on an OnPaint event handler.

Ivan

  • New Member
  • *
  • Posts: 10
Re: never show taskbar item for the form ???
« Reply #6 on: January 23, 2012, 07:14:26 pm »
Thank you, it works!

Ivan

  • New Member
  • *
  • Posts: 10
Re: never show taskbar item for the form ???
« Reply #7 on: May 04, 2012, 07:35:08 pm »
How can i make it on Linux?

Blaazen

  • Hero Member
  • *****
  • Posts: 3241
  • POKE 54296,15
    • Eye-Candy Controls
Re: never show taskbar item for the form ???
« Reply #8 on: May 04, 2012, 08:52:03 pm »
ShowInTaskBar:=stNever; works in Linux (both GTK2 & Qt4) but border style must be BorderStyle:=bsNone;
Although form is still visible in list of windows when you are switching by Alt+Tab.

EDIT: It seems I was not right. ShowInTaskBar:=stNever; works regardless on BorderStyle or FormStyle.
« Last Edit: May 04, 2012, 08:57:49 pm by Blaazen »
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

Ivan

  • New Member
  • *
  • Posts: 10
Re: never show taskbar item for the form ???
« Reply #9 on: May 04, 2012, 09:09:12 pm »
 :o It's really interesting: it works on Linux? but it's doesn't work in Windows  %) %) %) O:-)

 

TinyPortal © 2005-2018