Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
Available now!
Buy at Amazon US or
Buy at Amazon UK



Articles

» Windows API reference
» Webcam streaming in VB.NET
» Remoting with firewalls
» RSA from first principles
» Key & MouseLogger in .NET
» Networking Resource Kit for .NET
» Migrating VB6 Winsock to VB.NET
» Migrating C++ sockets to C#
» RFC Reference guide
» COM Reference guide
» WMI Reference guide
» SQL stored procedures
» TCP & UDP port reference
» NET Framework reference
» Ethernet Type codes
» MAC address assignments
» DLL entry point reference
» Boost SQL performance
» Free SMS UK
» Free SMS Ireland
» Free SMS South Africa
» Internet Explorer

Contact us



private void InputListener_MouseButton(
object sender, MouseButtonEventArgs e)
{
      if (e.buttonState == MouseButtonState.Pressed)
      {
            tbStatus.Text += "Pressed " +
 e.Button.ToString() + "\r\n";
      }
      else
      {
            tbStatus.Text += "Released " +
 e.Button.ToString() + "\r\n";
      }
      tbStatus.SelectionStart = tbStatus.Text.Length;
      tbStatus.ScrollToCaret();
}

And Finally for the MouseMove event handler

private void InputListener_MouseMove(
object sender, MouseMoveEventArgs e)
{
      tbStatus.Text += "Moved " + e.X.ToString() +
 "," + e.Y.ToString() + "\r\n";
      tbStatus.SelectionStart = tbStatus.Text.Length;
      tbStatus.ScrollToCaret();
}    

Et Voila, C’est Fini!

To test this application, run it from Visual Studio .NET, move the mouse click both buttons, then type something into notepad, and you will see coordinates appearing on-screen, along with what you clicked and typed.




Google

Copyright 2017 Infinite Loop Ltd.