May 2010
Intermediate to advanced
1752 pages
41h 17m
English
You might recall that the Control parent class defines a set of events that allow you to monitor mouse and keyboard activity in a variety of manners. To check this out firsthand, create a new Windows Forms Application project named MouseAndKeyboardEventsApp, rename the initial form to MainWindow.cs (using the Solution Explorer), and handle the MouseMove event using the Properties window. These steps generate the following event handler:
public partial class MainWindow : Form
{
public MainWindow()
{
InitializeComponent();
}
// Generated via the Properties window.
private void MainWindow_MouseMove(object sender, MouseEventArgs e)
{
}
}
The MouseMove event works in conjunction with the System.Windows.Forms.MouseEventHandler ...