MouseEventArgs

MouseEventArgs

System. Windows .Forms (system. windows .forms.dll) class

This class encapsulates the data for the Control.MouseDown , Control.MouseUp , and Control.MouseMove events. You can determine the X and Y coordinates of the mouse (in client coordinatescontrast this with Control.MousePosition ), the Button that was pressed (note that this is the button that caused the event, not the total set of buttons currently depressedyou should use Control.MouseButtons for this information).

You can also determine the number of Clicks that have occurred (i.e., single, double, triple, etc.), and the Delta through which the mouse wheel has rotated .

 public class  MouseEventArgs  : EventArgs {  // Public Constructors  public  MouseEventArgs  (MouseButtons  button  , int  clicks  , int  x  , int  y  , int  delta  );  // Public Instance Properties  public MouseButtons  Button  {get; }    public int  Clicks  {get; }    public int  Delta  {get; }    public int  X  {get; }    public int  Y  {get; } } 

Hierarchy

System.Object System.EventArgs MouseEventArgs

Subclasses

StatusBarPanelClickEventArgs

Passed To

Control.{OnMouseWheel() , RaiseMouseEvent()} , System.Windows.Forms.Design.ComponentTray.{OnMouseDown() , OnMouseMove() , OnMouseUp()} , MouseEventHandler.{BeginInvoke() , Invoke()}



. Net Windows Forms in a Nutshell
.NET Windows Forms in a Nutshell
ISBN: 0596003382
EAN: 2147483647
Year: 2002
Pages: 794

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net