[Lazarus] Should TTrayIcon work?
HEllo, I call TTrayIcon.Show at the Main Form OnCreate event. I shows OK, and as latest effort also the menu appears, but none of the Click events comes to the my program. Click, Do8uble Click and also the Menu Click Event are not fired. What could cause this, or is the TTrayIcon still in middle of development or so? Lazarus 1.0.6 / FPC 2.6.0 / Win32 -Tee- -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Should TTrayIcon work?
Click works for me. And the Menu too (thats not an event, it is a property), since many years. Or else the application in magnifier.sourceforge.net would not work. You could download it and see if its tray icon works in your system, I suppose it will and prove that the click and menu both work. Double Click I never used. -- Felipe Monteiro de Carvalho -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Should TTrayIcon work?
On 19.3.2013 11:44, Felipe Monteiro de Carvalho wrote: Click works for me. And the Menu too (thats not an event, it is a property), since many years. Or else the application in magnifier.sourceforge.net would not work. You could download it and see if its tray icon works in your system, I suppose it will and prove that the click and menu both work. Double Click I never used. If I Attach Menu, to Property, and Menu-item has OnClik event, if does not work for me,... And if (and if will) your program works, that is cool, but how to fix mine ;) I have All events have code and brake points, and execution never arrives on any of them. Program is so simple and almost ready, all I need now to get the Tray Icon thingy to work... What else there could be wrong or breaking that??? Also the program I tested have weird behavior on my Win8 machine. It'll make the task bar to flicker in weird manner, like the icons will move, should have some kind of video of it, maybe I just take one with Cell phone... My App has could panels, edits and buttons and Progress bar... That's all.. -Tee- -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Should TTrayIcon work?
On 19.3.2013 11:44, Felipe Monteiro de Carvalho wrote: Click works for me. And the Menu too (thats not an event, it is a property), since many years. Or else the application in magnifier.sourceforge.net would not work. You could download it and see if its tray icon works in your system, I suppose it will and prove that the click and menu both work. Double Click I never used. Same result with the after I updated the Lazarus to the 1.0.8 I'll try with minimal app so if that gives some clue... -tee- -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Should TTrayIcon work?
On 19.3.2013 9:46, Tommi Prami wrote: HEllo, I call TTrayIcon.Show at the Main Form OnCreate event. I shows OK, and as latest effort also the menu appears, but none of the Click events comes to the my program. Click, Do8uble Click and also the Menu Click Event are not fired. What could cause this, or is the TTrayIcon still in middle of development or so? Lazarus 1.0.6 / FPC 2.6.0 / Win32 -Tee- Weird, I made trivial test program and it worked OK... The back to my original code, and then I just did some trivial changes, nothing that should have changed behavior, but it did... Now it works :D -Tee- -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Should TTrayIcon work?
On 19.3.2013 9:46, Tommi Prami wrote: HEllo, I call TTrayIcon.Show at the Main Form OnCreate event. I shows OK, and as latest effort also the menu appears, but none of the Click events comes to the my program. Click, Do8uble Click and also the Menu Click Event are not fired. What could cause this, or is the TTrayIcon still in middle of development or so? Lazarus 1.0.6 / FPC 2.6.0 / Win32 -Tee- OK, This was not issue of the TTrayIcon at all,.. First I forgot the Release Compiling option so Brake points did not work... And couple other issues that I did not see coming... If I had code like this Self.WindowsState := wsMinimized; Self.Visible := False; And then I had in TrayIcon event if not Self.Visible then begin .. Show the form here end; The Seems that form thought it would be visible even I set it False just before... So I took the If out of there, so it works... (Did not check WindowsState, maybe that would work???) And then the final Gotcha... I added Start Minimized Functionality to Program and if I set minimize the Form and set visible to False on Forms.OnCreate Event. Form never comes back again. I made Hack to start timer with Short delay, and do the minimizing of the Form there. After the form has been shown, then it works... Not sure are these bugs, (In FPC/Lazarus level or even Windows) or how I could hide the Window without showing the Glimpse of it before... And if I set forms Visible to False, one could think you can trust it stays that way ;) I can file bug reports if thse seems to be bugs... -tee- -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Should TTrayIcon work?
On 20.3.2013 19:28, Tommi Prami wrote: On 19.3.2013 9:46, Tommi Prami wrote: HEllo, I call TTrayIcon.Show at the Main Form OnCreate event. I shows OK, and as latest effort also the menu appears, but none of the Click events comes to the my program. Click, Do8uble Click and also the Menu Click Event are not fired. What could cause this, or is the TTrayIcon still in middle of development or so? Lazarus 1.0.6 / FPC 2.6.0 / Win32 -Tee- OK, This was not issue of the TTrayIcon at all,.. First I forgot the Release Compiling option so Brake points did not work... And couple other issues that I did not see coming... If I had code like this Self.WindowsState := wsMinimized; Self.Visible := False; And then I had in TrayIcon event if not Self.Visible then begin .. Show the form here end; The Seems that form thought it would be visible even I set it False just before... So I took the If out of there, so it works... (Did not check WindowsState, maybe that would work???) And then the final Gotcha... I added Start Minimized Functionality to Program and if I set minimize the Form and set visible to False on Forms.OnCreate Event. Form never comes back again. I made Hack to start timer with Short delay, and do the minimizing of the Form there. After the form has been shown, then it works... Not sure are these bugs, (In FPC/Lazarus level or even Windows) or how I could hide the Window without showing the Glimpse of it before... And if I set forms Visible to False, one could think you can trust it stays that way ;) I can file bug reports if thse seems to be bugs... -tee- OK, this gets last in here... So I make new "thread"... -tee- -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus