-
Notifications
You must be signed in to change notification settings - Fork 940
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ContextMenuStrip show on wrong monitor #11289
Comments
Seems to be a known problem for over 9 years: https://stackoverflow.com/questions/26587843/prevent-toolstripmenuitems-from-jumping-to-second-screen/78399012#78399012 |
@Olina-Zhang can your team please test this? @osexpert are both the monitors at normal DPI? |
@elachlan Here are the test results:
test11289.mp4 |
Fantastic analysis! Thanks! |
This is not a regression, and it doesn't meet the bar for the team to address in .NET 9 given current priorities. We, of course, wouldn't say no to a community contribution that addresses the issue! |
This issue is now marked as "help wanted", and we’re looking for a community volunteer to work on this issue. If we receive no interest in 180 days, we will close the issue. To learn more about how we handle feature requests, please see our documentation. Happy Coding! |
.NET version
dotnet8
Did it work in .NET Framework?
Not tested/verified
Did it work in any of the earlier releases of .NET Core or .NET 5+?
No idea. I had to switch to ContextMenuStrip because ContextMenu was removed in dotnet6. It may never have worked correctly.
Issue description
In dotnet 8, create a new WinForms project. Add a ContextMenuStrip on the Form.
In the Form mouse click event, do this:
private void Form1_MouseClick(object sender, MouseEventArgs e)
{
contextMenuStrip1.Show(this, e.Location);
}
Use 2 monitors.
Run app, maximize app\form on first (left) monitor.
Click on form close to the right edge of first (left) monitor.
Notice the context menu is showing on the second (right) monitor.
This is not very user friendly! Also, ContextMenu that was removed in WinForms for dotnet6 did not have this problem.
Steps to reproduce
Info in Issue description
The text was updated successfully, but these errors were encountered: