Recent

Author Topic: API WND (No Taskbar Button) How can I get rid of this button ?  (Read 9689 times)

Remy Lebeau

  • Hero Member
  • *****
  • Posts: 1312
    • Lebeau Software
Re: API WND (No Taskbar Button) How can I get rid of this button ?
« Reply #15 on: January 10, 2018, 12:12:09 am »
can anybody give me a hint how to get rid of the taskbar button ?

There is another option that noone has mentioned yet: ITaskbarList.DeleteTab()

Quote
Deletes an item from the taskbar.

Your app can delete its own Taskbar button (and re-add it, via ITaskbarList.AddTab()) without having to mess around with the window styles at all.
Remy Lebeau
Lebeau Software - Owner, Developer
Internet Direct (Indy) - Admin, Developer (Support forum)

RAW

  • Hero Member
  • *****
  • Posts: 868
Re: API WND (No Taskbar Button) How can I get rid of this button ?
« Reply #16 on: January 10, 2018, 02:22:38 am »
Thanks to all for the information, it's always nice to know several options.

It's the first time I hear something about this "ITaskbarList" interface... funny... but good to know...  :)
Windows 7 Pro (x64 Sp1) & Windows XP Pro (x86 Sp3).

metis

  • Sr. Member
  • ****
  • Posts: 300
Re: API WND (No Taskbar Button) How can I get rid of this button ?
« Reply #17 on: January 15, 2018, 01:25:20 pm »
@Thaddy

Quote
If the window has the dialog style it also doesn't show up. For a mainform try fsSplash ...
I tried out Your suggestion:
-> It doesn't work for me (WinXP SP3 32bit + Lazarus v1.6.4 + FPC v3.0.2):
I tried 'fsSplash' in 'FormCreate' and in the Object Inspector, and...
...still have a TaskbarButton.
If I put 'FormStyle := fsSplash;' into 'FormShow', the App crashes with ErrMsg 'External: SIGSEGV'.

Quote
since fsDialog is sadly missing
There is no 'FormStyle := fsDialog', but there is a 'BorderStyle := bsDialog'.
Unfortunately, this doesn't hide the TaskbarButton either.

-> 'Application.MainFormOnTaskbar := False;' or 'ShowInTaskBar := stNever' do not work
     (= another Lazarus-Bug).  >:(
    The same Problem occurs, it You want to make a Form transparent.
=> Solution: The Use of WindowsAPI-Calls.

As an Example, how to solve these Lazarus-intrinsic Headaches, have a Look at 'Mouse Eyes'.
'Mouse Eyes' is a MouseTracker/MouseCursor-Follower.
A little, but very useful Pascal-App, specially if You work with several Screens.
I found it (many, many) Years ago at <delphi.about.com>, and I use it until today.

'Mouse Eyes' has a MainForm, that is:
- transparent, and
- on Top (TOP or TOPMOST), and
- without Border, without TitleBar, but
- still movable and able to be closed with the Mouse.  :D

You'll find the original D7-MouseEyes-Project, together with my Port to FPC/Lazarus in the Attachment:
'LazMouseEyesByMetis.7z'.
« Last Edit: April 08, 2022, 01:14:40 pm by metis »
Life could be so easy, if there weren't those f*** Details.
My FFmpeg4Lazarus = FFPlay4Laz + FFGrab4Laz + FFInfo4Laz

 

TinyPortal © 2005-2018