I want to show my form on the screen I'm clicking on.
For this I use a globalhookMouse
to get the coordinates of my cursor outside my form. I've two screen (1280x1024 and 1680x1050).
I've tried to put my form if my Cursor.Position.X
is lower than one of my resolution but I get higher value.
This is how I hook my form to show
private void GlobalHookMouseDownExt(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Middle)
{
this.Show();
this.TopLevel = true;
}
}
How can I know from which screen I clicked to show my form on the right screen ?