Monday, 21 May 2018

System tray icon in Windows for FireMonkey app, examples


 
http://www.devsuperpage.com/search/Articles.aspx?G=2&ArtID=135482

Is not an option.

procedure Tmain_form.FormCreate(Sender: TObject);
var
   nid : TNotifyIconData;
   A: array [0..78] of Char;
begin
  StrPCopy(A, ParamStr(0));
  with nid do
  begin
    cbSize := SizeOf;
    Wnd := FmxHandleToHWND(self.Handle);
    uID := 1;
    uFlags := NIF_ICON or NIF_MESSAGE or NIF_TIP;
    uCallbackMessage := 100;
    hIcon := ExtractIconW(HInstance, A, 0);
    StrPCopy(szTip, 'This is my icon');
  end;
  Shell_NotifyIcon( NIM_ADD, @nid );
end;

This is my idea, but needs refinement.


1 comment:

zomok E-commerce system plan. Choose your online ordering system. No-risk 30 day free trial. Then USD 9/month. No credit card required.

zomok E-commerce system plan. Choose your online ordering system. No-risk 30 day free trial. Then USD 9/month. No credit card required. h...