Processing leftMouseButton and rightMouseButton with TrayIcon component lazarus / 5-Lazarus Extra Components ---------------------------------------------------------------------- bdexterholland · 2013-03-29 14:47 Hi folks! Could some tell me how to process leftMouseButton to popup a menu and rightMouseButton to another popup menu? ---------------------------------------------------------------------- howardpc · 2013-03-29 14:59 Drop two popup menus on a form and try some variation of this: Code: [Select]procedure TForm1.FormMouseDown(Sender: TObject; Button: TMouseButton;   Shift: TShiftState; X, Y: Integer); var p: TPoint; begin   p := ClientToScreen(Point(x, y));   case button of    mbLeft: PopupMenu1.PopUp(p.x, p.y);    mbRight: PopupMenu2.PopUp(p.x, p.y);   end; end; ---------------------------------------------------------------------- Blaazen · 2013-03-29 15:04 For the right button you can use property PopupMenu. Almost all components have it. ---------------------------------------------------------------------- User137 · 2013-03-29 15:41 You can use the TTrayIcon.onMouseDown event. ---------------------------------------------------------------------- bdexterholland · 2013-03-29 19:00 Thanks for the hints! I was blind looking for Buttons' especific events