Hi @ms account , Welcome to Microsoft Q&A,
After testing with the following code in Windows 10/11:
private void notifyIcon1_MouseDown(object sender, MouseEventArgs e)
{
MessageBox.Show(e.Button.ToString());
}
In Windows 11, notifyIcon1_MouseDown seems to recognize the middle mouse button as the left button. I tested this function normally in Windows 11.
It seems that you can do what you want by building a global hook, but that is very troublesome and unsafe. If there are no special needs, I suggest you use other methods (such as left click and right click, single click and double click, you have four combinations to use)
Waiting for your reply.
Best Regards,
Jiale
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.