programming-examples/c-sharp/Others/On Mouse Wheel.cs
2019-11-15 12:59:38 +01:00

29 lines
551 B
C#

On Mouse Wheel
using System;
using System.Drawing;
using System.Windows.Forms;
class PoePoem: Form
{
public static void Main()
{
if (!SystemInformation.MouseWheelPresent)
{
Console.WriteLine("needs a mouse with a mouse wheel!");
return;
}
Application.Run(new PoePoem());
}
public PoePoem()
{
}
protected override void OnMouseWheel(MouseEventArgs mea)
{
Console.WriteLine(mea.Delta);
}
}