I would like to know when my cursor is located within a specific aera ( a small rectangle for instance in the very right of the screen ).
When My cursor is in this aera, the form i’m dragging must have a higher height.
By now, i just have this :
private void Form1_LocationChanged(object sender, EventArgs e)
{
if (Cursor.Position == new Point(-1037, 516))
{
this.Height = 450;
}
}
Thus, i need to create a condition to know if my cursor is located within a specific aera ( right of the screen )
Can anyone help me on this
thanks in advance.
Cursor.Positionis in screen coordinates. You may test if the position is withing a specified range:edit: to test if the cursor is inside a border area, just like @Philip wrote: