'Moving the cursor to top left corner of the screen in C# Winforms App
I have a MainForm which opens a modal dialog using ShowDialog() method.
In that modal dialog class Form_Load method I have:
private void Form_Load(object sender, EventArgs e)
{
this.Cursor = new Cursor(Cursor.Current.Handle);
Cursor.Position = new Point(0, 0);
}
I found above code somewhere in internet searching for information about moving the cursor to 0, 0 position.
If I remove code this.Cursor = new Cursor(Cursor.Current.Handle);, it also works, moving the cursor to 0, 0 position.
What is that cursor creation used for? should a border condition exist somehow when the app will be used?
Thanks Jaime
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
