Recent

Author Topic: Taskbar icon disappears  (Read 10752 times)

Tahunasky

  • Newbie
  • Posts: 4
Taskbar icon disappears
« on: September 05, 2009, 05:43:14 am »
Hi,

I have 2 forms in my project. When i hide the main form and show the second form the icon disappears from the taskbar.. Then when i show the main form again the icon reappears..

I am using Windows 7.

Does anyone know how to fix this ?

Blaazen

  • Hero Member
  • *****
  • Posts: 3237
  • POKE 54296,15
    • Eye-Candy Controls
Re: Taskbar icon disappears
« Reply #1 on: September 05, 2009, 02:43:42 pm »
Hi,
I think it is normal. Taskbar shows you only icons of visible forms. When you would click on icon of hidden form then nothing happen.
I tried it in linux. I have icon Form1 on taskbar and when I do Form1.Hide; Form2.Show; then I have only icon Form2 on taskbar.
What is your goal, you want have icon of Form1 always (no matter if visible or not) and Form2 icon only when is visible?
You can also use Form1.Enabled:=False; instead of Hide; .
B.
« Last Edit: September 05, 2009, 03:15:11 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/

Tahunasky

  • Newbie
  • Posts: 4
Re: Taskbar icon disappears
« Reply #2 on: September 05, 2009, 05:02:06 pm »
It is not normal.. Windows programs have a application icon which is not associated with any form or dialog box, and is shown when the application is run unless set to nothing. It is part of the application class WndClass.hIcon:=LoadIcon(hinstance,'#1').

In delphi it is the same, Application.Icon.Handle..  You can hide the main form and it is still on the taskbar.

I have 4 forms in my program. Depending on what the user selects, depends on what form is shown, but i always want to have an icon on the taskbar, so if another windows is over the top of my program they can always click on the icon and display it. I also want to hide any forms that are not needed.

Blaazen

  • Hero Member
  • *****
  • Posts: 3237
  • POKE 54296,15
    • Eye-Candy Controls
Re: Taskbar icon disappears
« Reply #3 on: September 05, 2009, 07:58:27 pm »
In linux, every window has icon on taskbar, so when one is visible and others are hidden there is only one icon and no problem.
If I understand you, there is absolutely no icon if the fisrt form is hidden and others visible.
The solution can be in setting FormStyle. If you have fsMDIForm and fsMDIChild try to change it to fsNormal on all forms.
There is also option ShowInTaskBar, but it seems it do nothing here on linux.

Hi, B.
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/

Tahunasky

  • Newbie
  • Posts: 4
Re: Taskbar icon disappears
« Reply #4 on: September 06, 2009, 01:34:03 am »
Hi, the show in taskbar fixed the problem.. all forms were fsnormal...

thanks for you help..

 

TinyPortal © 2005-2018