I have a simple .Net 5.0 WinForm form which is automatically hidden after the application started:
private void form_Shown (object sender, EventArgs e)
{
Hide ();
}
It only creates a notify icon. This notify icon has a context menu strip that is shown by a left mouse click:
private void notifyIcon_Click (object sender, EventArgs e)
{
contextMenuStrip.Show (MousePosition);
}
This works fine, but as long as the context menu strip is visible, a dummy taskbar icon appears:
This doesn't happen if the form is not hidden or the context menu strip is shown by a right mouse click (via ContextMenuStrip property).
How can I prevent this icon?

Try Me.Hide()
lets see the outcome
Try assign your context menu to the notifyicon
s .ContextMenu property like and use the notifyicons .Visible property to show it instead of using the .Show method.