[better] - Shell_notifyicongetrect

However, for years, there was a glaring gap in the API:

Beyond the Balloon: Using Shell_NotifyIconGetRect to Find Your Notify Icon’s Exact Screen Location shell_notifyicongetrect

[StructLayout(LayoutKind.Sequential)] struct NOTIFYICONIDENTIFIER { public uint cbSize; public IntPtr hWnd; public uint uID; public Guid guidItem; // Usually Guid.Empty for simple cases } [DllImport("shell32.dll", CharSet = CharSet.Unicode, PreserveSig = false)] static extern void Shell_NotifyIconGetRect(ref NOTIFYICONIDENTIFIER identifier, out RECT iconRect); However, for years, there was a glaring gap