|
using System.Windows.Forms;
namespace Gma.UserActivityMonitorDemo
{
public partial class TestFormComponent : Form
{
public TestFormComponent()
{
InitializeComponent();
}
#region Event handlers of particular events. They will be activated when an appropriate checkbox is checked.
private void HookManager_KeyDown(object sender, KeyEventArgs e)
{
textBoxLog.AppendText(string.Format("KeyDown - {0}\n", e.KeyCode));
textBoxLog.ScrollToCaret();
}
private void HookManager_KeyUp(object sender, KeyEventArgs e)
{
textBoxLog.AppendText(string.Format("KeyUp - {0}\n", e.KeyCode));
textBoxLog.ScrollToCaret();
}
private void HookManager_KeyPress(object sender, KeyPressEventArgs e)
{
textBoxLog.AppendText(string.Format("KeyPress - {0}\n", e.KeyChar));
textBoxLog.ScrollToCaret();
}
private void HookManager_MouseMove(object sender, MouseEventArgs e)
{
labelMousePosition.Text = string.Format("x={0:0000}; y={1:0000}", e.X, e.Y);
}
private void HookManager_MouseClick(object sender, MouseEventArgs e)
{
textBoxLog.AppendText(string.Format("MouseClick - {0}\n", e.Button));
textBoxLog.ScrollToCaret();
}
private void HookManager_MouseUp(object sender, MouseEventArgs e)
{
textBoxLog.AppendText(string.Format("MouseUp - {0}\n", e.Button));
textBoxLog.ScrollToCaret();
}
private void HookManager_MouseDown(object sender, MouseEventArgs e)
{
textBoxLog.AppendText(string.Format("MouseDown - {0}\n", e.Button));
textBoxLog.ScrollToCaret();
}
private void HookManager_MouseDoubleClick(object sender, MouseEventArgs e)
{
textBoxLog.AppendText(string.Format("MouseDoubleClick - {0}\n", e.Button));
textBoxLog.ScrollToCaret();
}
private void HookManager_MouseWheel(object sender, MouseEventArgs e)
{
labelWheel.Text = string.Format("Wheel={0:000}", e.Delta);
}
#endregion
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.