I am working on c# winforms application. I am actively working with 2 monitors namely primary and secondary. When I run the application, Message Box always pops up on the primary monitor irrespective on which monitor I run the application.
Here below shown are the 2 ways I tried but Message Box pops up on primary monitor:
1.
MessageBox.Show("Test Success", "Success", MessageBoxButtons.OK,
MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1,
MessageBoxOptions.ServiceNotification);
2.
MessageBox.Show("Test Success", "Success", MessageBoxButtons.OK,
MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1,
MessageBoxOptions.DefaultDesktopOnly);
Is there any way I can display Message Box on the monitor I run the application dynamically?