Hi, I’m trying to put my program as tray icon in a Taskbar of Windows, the Icon appears but when I try to use the mouse, he simply doesn’t work, this is code I’m using:
procedure TForm1.Button1Click(Sender: TObject);
var
LTrayI : PNotifyIconData;
begin
LTrayI.cbSize := SizeOf(LTrayI);
LTrayI.Wnd := Application.Handle;
LTrayI.uID := 1;
LTrayI.uFlags := NIF_ICON or NIF_TIP or NIF_MESSAGE;
LTrayI.uCallbackMessage := WM_LBUTTONDOWN;
LTrayI.hIcon := Self.Icon.Handle;
LTrayI.szTip := 'Tooltip test' + chr(0);
Shell_NotifyIcon(NIM_ADD, LTrayI);
end;