* * *

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

Remy Lebeau

  • Sr. Member
  • ****
  • Posts: 426
    • 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: 667
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) And Windows XP Pro (x86 Sp3) - LAZARUS 1.8.4 FPC 3.0.4 // 1.7 FPC 3.1.1

metis

  • Full Member
  • ***
  • Posts: 122
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, and my Port to FPC/Lazarus in the Attachment:
'LazMouseEyesByMetis.7z'.
« Last Edit: January 19, 2018, 01:00:13 pm by metis »
Life could be so easy, if there weren't those f*** Details.

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus