MouseEventArgs::Location Property
.NET Framework (current version)
Gets the location of the mouse during the generating mouse event.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
The following code example uses the Location property to track left mouse clicks and draw a series of straight line segments in response to user input. The example does not persist the drawn lines if you hide the form and then redisplay it; this code was omitted for simplicity.
.NET Framework
Available since 2.0
Available since 2.0
Show: