Recent

Author Topic: Can I develop a System Tray application ?  (Read 10328 times)

finalist

  • Jr. Member
  • **
  • Posts: 99
Can I develop a System Tray application ?
« on: April 18, 2011, 09:20:23 pm »
I have an Application developed under LAZARUS.
I would like to change it's behavior:
1. The Application to start into System Try and does show it's Form;
2. By click or double-click on the Tray-Icon to show Application-Form;
Is it possible ?
If it is possible - how ?
Thank you !

Dibo

  • Hero Member
  • *****
  • Posts: 1052
Re: Can I develop a System Tray application ?
« Reply #1 on: April 18, 2011, 09:22:32 pm »
Drop component TTrayIcon from Additional

finalist

  • Jr. Member
  • **
  • Posts: 99
Re: Can I develop a System Tray application ?
« Reply #2 on: April 18, 2011, 11:01:37 pm »
Drop component TTrayIcon from Additional
O.k. it is done.
I dropped a TPopupMenu component too.
There is a problem for me, I can not solve: The Form and the Tray Icon Show after Start the Application ( but I would like to see only the Tray-Icon and after I click on Popup-Menu to show the Form ) ..

Blaazen

  • Hero Member
  • *****
  • Posts: 3241
  • POKE 54296,15
    • Eye-Candy Controls
Re: Can I develop a System Tray application ?
« Reply #3 on: April 18, 2011, 11:42:07 pm »
Set MainForm.Visible:=False; (do it in Object Inspector)
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/

Shebuka

  • Sr. Member
  • ****
  • Posts: 429
Re: Can I develop a System Tray application ?
« Reply #4 on: April 19, 2011, 10:02:00 am »
or if you have something to load in OnShow event, at the end, before the 'end;' put MainForm.Hide

finalist

  • Jr. Member
  • **
  • Posts: 99
Re: Can I develop a System Tray application ?
« Reply #5 on: April 19, 2011, 11:42:18 am »
or if you have something to load in OnShow event, at the end, before the 'end;' put MainForm.Hide
This works o.k.

 

TinyPortal © 2005-2018