TrayIcon and hiding the main form on Kubuntu lazarus / 13-General ---------------------------------------------------------------------- dummzeuch · 2008-02-23 13:45 Hi, I just got Lazarus 0.9.24 Beta to actually work on my computer and managed to convert one of my Kylix projects which also works fine. So far, so good. Now, I want to write a small tray-icon application for Kubuntu. I copied the example app from /usr/share/lazarus/examples/trayicon and it compiled fine. It displays and hides the icon. But then I wanted to hide the main form and only show it when the user clicks on the tray icon. But neither of the following worked in the FormCreate event: Self.Hide; Self.Visible := false; The form stayed visible all the same. It works, if I put the code in the Button1Click event, but I want the form to be hidden from the start. What am I doing wrong? twm ---------------------------------------------------------------------- OnixJr · 2008-02-23 14:09 On FormShow add Self.Hide =PPP ¬¬ Use ShowMainForm property! Go to Project - View Source and on the source add the code: Code: [Select]   Application.Title := 'MyProjectName'; // add after this   Application.ShowMainForm := False; ---------------------------------------------------------------------- dummzeuch · 2008-02-23 14:26 Quote from: "OnixJr" Use ShowMainForm property! Go to Project - View Source and on the source add the code: Code: [Select]   Application.Title := 'MyProjectName'; // add after this   Application.ShowMainForm := False; Thanks, that did the trick. Now I have got more problems: 1. The TrayIcon's OnClick event never gets fired 2. The TrayIcon's popup menu gets displayed in the upper left corner of the screen rather than near the tray icon Any hints on that? twm ---------------------------------------------------------------------- OnixJr · 2008-02-23 18:49 Sorry, I not know nothing about this (here with WinXP OnClick work normally) =\ But is better you open a new topic (with respective subject) and If you confirm that is a bug, then you should post them in Bug-Tracker... Thanks!