void MyControl_MouseDown(object sender, Eto.Forms.MouseEventArgs e) { if (e.Buttons == Eto.Forms.MouseButtons.Primary) { // Code to handle left mouse button down event } }
void MyControl_MouseMove(object sender, Eto.Forms.MouseEventArgs e) { int mouseX = e.X; int mouseY = e.Y; // Code to use mouse coordinates... }Here, we handle the MouseMove event for a control using ToEto MouseEventArgs. We get the X and Y coordinates of the mouse cursor, and use them for some action. Package library: ToEto.Forms