Microsoft Visual Studio 2010做的C#简单的鼠标钩子应用实例实例,实现实时监控鼠标位置(需要编译后,在Release文件夹那里运行)主要代码: public delegate int HookProc(int nCode, IntPtr wParam, IntPtr lParam); //定义钩子句柄 public static int m_iHock = 0; //定义钩子类型 public const int WH_MOUSE_LL = 14; public Ho
第01个小程序:随鼠标移动而变色的背景(VaryTheBackground.cs) 程序运行时,当鼠标指针靠近窗口中心程度不同,客户区的背景颜色也不同。 using System; using System.Windows; using System.Windows.Input; using System.Windows.Media; namespace Chapter02 { public class VaryTheBackground : Window { SolidColorBrush