TrayIconData: TNotifyIconData; <-- Denne linie står i min private..
ShellAPI er added i users
Men får en fejl i with .. why ?
[DCC Error] Source.pas(44): E2029 Declaration expected but 'WITH' found
procedure Tmainform.FormCreate(Sender: TObject);
with TrayIconData do
begin
cbSize := SizeOf(TrayIconData);
Wnd := Handle;
uID := 0;
uFlags := NIF_MESSAGE + NIF_ICON + NIF_TIP;
uCallbackMessage := WM_ICONTRAY;
hIcon := Application.Icon.Handle;
StrPCopy(szTip, Application.Title);
end;
Shell_NotifyIcon(NIM_ADD, @TrayIconData);
end;