Mouse set in the form
-
Goodmorning, I would like to start my form having the mouse set in the form area (in any position is ok, but in the form) at the start. Is it possible? Thanks
-
Goodmorning, I would like to start my form having the mouse set in the form area (in any position is ok, but in the form) at the start. Is it possible? Thanks
Windows Forms? If so, just set MouseLocation to your desired location.
-
Windows Forms? If so, just set MouseLocation to your desired location.
MouseLocation is it a proprties? of which object?
-
Goodmorning, I would like to start my form having the mouse set in the form area (in any position is ok, but in the form) at the start. Is it possible? Thanks
Yes - you have to work relative to the Form Location property, but it's pretty simple:
private void frmMain_Load(object sender, EventArgs e)
{
Cursor.Position = new Point(Location.X + 10, Location.Y + 10);
}Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952) Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
-
Goodmorning, I would like to start my form having the mouse set in the form area (in any position is ok, but in the form) at the start. Is it possible? Thanks