Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version
Go to top

Global Windows Hooks

, 24 Sep 2010
A single component that contains various Windows hooks
Library_Files.zip
Library Files
WindowsHookLib.dll
Source_Code_and_Demo.zip
Source Code and Demo
WindowsHookDemo
WindowsHookDemo.suo
WindowsHookDemo
bin
Debug
WindowsHookDemo.exe
WindowsHookDemo.vshost.exe
WindowsHookLib.dll
Release
My Project
Application.myapp
Settings.settings
WindowsHookDemo.vbproj.user
WindowsHookLib
WindowsHookLib.suo
WindowsHookLib
bin
Release
x86
Release
WindowsHookLib.dll
WindowsHookLib.dll.lastcodeanalysissucceeded
WindowsHookLib.pdb
Properties
Resources
clipboard.ico
keyboard.ico
mouse.ico
Thumbs.db
WindowsHookLib_Component.zip
WindowsHookLib Component
WindowsHookLib.dll
<?xml version="1.0"?>
<doc>
<assembly>
<name>
WindowsHookLib
</name>
</assembly>
<members>
<member name="M:WindowsHook.MouseEventArgs.#ctor(System.Windows.Forms.MouseButtons,System.Int32,System.Int32,System.Int32,System.Int32)">
	<param name="button">One of the System.Windows.Forms.MouseButtons 
 values indicating which mouse button was pressed.</param>
	<param name="clicks">The number of times a mouse button was pressed.</param>
	<param name="x">The x-coordinate of a mouse click, in pixels.</param>
	<param name="y">The y-coordinate of a mouse click, in pixels.</param>
	<param name="delta">A signed count of the number 
 of detents the wheel has rotated.</param>
</member><member name="P:WindowsHook.MouseEventArgs.Handled">
	<summary>
 Gets or sets a value indicating whether the event was handled.
 </summary>
</member><member name="T:WindowsHook.MouseEventArgs">
	<summary>
 Provides data for the WindowsHookLib.MouseHook.MouseDown,
 WindowsHookLib.MouseHook.MouseUp, WindowsHookLib.MouseHook.MouseMove 
 and WindowsHookLib.MouseHook.MouseWheel events.  
 </summary>
</member><member name="T:WindowsHook.MouseHookException">
	<summary>
 Represents errors that occur in WindowsHookLib.MouseHook.
 </summary>
</member><member name="P:WindowsHook.KeyboardEventArgs.SuppressKeyPress">
	<summary>
 Gets or sets a value indicating whether the event was handled.
 </summary>
</member><member name="P:WindowsHook.KeyboardEventArgs.VirtualKeyCode">
	<summary>
 Gets the virtual key code for a KeyDown or KeyUp event.
 </summary>
</member><member name="M:WindowsHook.KeyboardEventArgs.#ctor(System.Windows.Forms.Keys,System.Windows.Forms.Keys)">
	<param name="keyData">A System.Windows.Forms.Keys representing 
 the key that was pressed, combined with any modifier flags that 
 indicate which CTRL, SHIFT, and ALT keys were pressed at the same time. 
 Possible values are obtained by applying bitwise OR (|) operator 
 to constants from the System.Windows.Forms.Keys enumeration.</param>
</member><member name="T:WindowsHook.KeyboardEventArgs">
	<summary>
 Provides data for the WindowsHookLib.KeyboardHook.KeyDown and 
 WindowsHookLib.KeyboardHook.KeyUp events. 
 </summary>
</member><member name="M:WindowsHook.ClipboardEventArgs.#ctor(System.IntPtr,System.IntPtr)">
	<param name="hookedWindow">A window handle associated with this hook.</param>
	<param name="sourceWindow">The window handle that has set the last clipboard data.</param>
</member><member name="P:WindowsHook.ClipboardEventArgs.HookedWindow">
	<summary>
 Gets a window handle associated with this hook.
 </summary>
</member><member name="P:WindowsHook.ClipboardEventArgs.SourceWindow">
	<summary>
 Gets the window handle that has set the last clipboard data.
 </summary>
</member><member name="T:WindowsHook.ClipboardEventArgs">
	<summary>
 Provides data for the WindowsHookLib.ClipboardHook.ClipboardChanged events.
 </summary>
</member><member name="F:WindowsHook.MapOn.PrimaryMonitor">
	<summary>
 Maps the absolute coordinates of the mouse on the screen. 
 In a multimonitor system, the coordinates map to the primary monitor.
 </summary>
</member><member name="F:WindowsHook.MapOn.VirtualDesktop">
	<summary>
 On Windows 2000/XP, maps the mouse coordinates to the entire virtual desktop (multimonitor system).
 </summary>
</member><member name="T:WindowsHook.MapOn">
	<summary>
 Represents mouse coordinate mapping enumatation.
 </summary>
</member><member name="E:WindowsHook.MouseHook.StateChanged">
	<summary>
 Occurs when the MouseHook state changed.
 </summary>
</member><member name="E:WindowsHook.MouseHook.MouseDown">
	<summary>
 Occurs when a mouse button is down.
 </summary>
</member><member name="E:WindowsHook.MouseHook.MouseMove">
	<summary>
 Occurs when the mouse pointer is moved.
 </summary>
</member><member name="E:WindowsHook.MouseHook.MouseUp">
	<summary>
 Occurs when a mouse button is up.
 </summary>
</member><member name="E:WindowsHook.MouseHook.MouseWheel">
	<summary>
 Occurs when the mouse wheel is rotated.
 </summary>
</member><member name="E:WindowsHook.MouseHook.MouseClick">
	<summary>
 Occurs when a mouse button is clicked.
 </summary>
</member><member name="E:WindowsHook.MouseHook.MouseDoubleClick">
	<summary>
 Occurs when a mouse button is double clicked.
 </summary>
</member><member name="P:WindowsHook.MouseHook.Info">
	<summary>
 Gets the component's assembly information.
 </summary>
</member><member name="P:WindowsHook.MouseHook.State">
	<summary>
 Gets the state of the mouse hook.
 </summary>
</member><member name="M:WindowsHook.MouseHook.InstallHook">
	<summary>
 Installs the mouse hook for this application.
 </summary>
</member><member name="M:WindowsHook.MouseHook.RemoveHook">
	<summary>
 Removes the mouse hook for this application.
 </summary>
</member><member name="M:WindowsHook.MouseHook.SetMouseDownArgs(WindowsHook.UnsafeNativeMethods.MouseData,System.Windows.Forms.MouseButtons)">
	<summary>
 Sets the mouse down data for the MouseEventArgs object 
 and calls OnMouseDown method to raise the mouse down event.
 </summary>
	<param name="lParam">A MouseData structure object 
 that contains the data for the mouse down event.</param>
	<param name="btn">A mouse button that is down.</param>
</member><member name="M:WindowsHook.MouseHook.SetMouseUpArgs(WindowsHook.UnsafeNativeMethods.MouseData,System.Windows.Forms.MouseButtons)">
	<summary>
 Sets the mouse up data for the MouseEventArgs object 
 and calls OnMouseUp method to raise the mouse up event. 
 </summary>
	<param name="lParam">A MouseData structure object 
 that contains the data for the mouse up event.</param>
	<param name="btn">A mouse button that is up.</param>
</member><member name="M:WindowsHook.MouseHook.SynthesizeMouseDown(System.Windows.Forms.MouseButtons,System.IntPtr)">
	<summary>
 Synthesizes a mouse down event system wide.
 </summary>
	<param name="button">A Windows.Forms.MouseButton that should be down.</param>
	<param name="extraInfo">Specifies an additional value 
 associated with the mouse event.</param>
</member><member name="M:WindowsHook.MouseHook.SynthesizeMouseUp(System.Windows.Forms.MouseButtons,System.IntPtr)">
	<summary>
 Synthesizes a mouse up event system wide.
 </summary>
	<param name="button">A Windows.Forms.MouseButton that should be up.</param>
	<param name="ExtraInfo">Specifies an additional value 
 associated with the mouse event.</param>
</member><member name="M:WindowsHook.MouseHook.SynthesizeMouseWheel(System.Int32,System.IntPtr)">
	<summary>
 Synthesizes a mouse wheel event system wide.
 </summary>
	<param name="wheelClicks">A positive value indicates that the wheel was rotated forward, 
 away from the user; a negative value indicates that the wheel was rotated backward, toward 
 the user. One wheel click is defined as wheel delta, which is 120.</param>
	<param name="ExtraInfo">Specifies an additional value 
 associated with the mouse event.</param>
</member><member name="M:WindowsHook.MouseHook.SynthesizeMouseMove(System.Drawing.Point,WindowsHook.MapOn,System.IntPtr)">
	<summary>
 Synthesizes a mouse move event system wide.
 </summary>
	<param name="location">A screen location where the mouse should be moved.</param>
	<param name="Mapping">Specifies where the mouse coordinates should be mapped.</param>
	<param name="ExtraInfo">Specifies an additional value 
 associated with the mouse event.</param>
</member><member name="M:WindowsHook.MouseHook.OnStateChanged(WindowsHook.StateChangedEventArgs)">
	<summary>
 Raises the WindowsHookLib.MouseHook.StateChanged event.
 </summary>
	<param name="e">A WindowsHookLib.StateChangedEventArgs
 that contains the event data.</param>
</member><member name="M:WindowsHook.MouseHook.OnMouseMove(WindowsHook.MouseEventArgs)">
	<summary>
 Raises the WindowsHookLib.MouseHook.MouseMove event.
 </summary>
	<param name="e">A WindowsHookLib.MouseEventArgs
 that contains the event data.</param>
</member><member name="M:WindowsHook.MouseHook.OnMouseDown(WindowsHook.MouseEventArgs)">
	<summary>
 Raises the WindowsHookLib.MouseHook.MouseDown event.
 </summary>
	<param name="e">A WindowsHookLib.MouseEventArgs
 that contains the event data.</param>
</member><member name="M:WindowsHook.MouseHook.OnMouseUp(WindowsHook.MouseEventArgs)">
	<summary>
 Raises the WindowsHookLib.MouseHook.MouseUp event.
 </summary>
	<param name="e">A WindowsHookLib.MouseEventArgs
 that contains the event data.</param>
</member><member name="M:WindowsHook.MouseHook.OnMouseClick(System.Windows.Forms.MouseEventArgs)">
	<summary>
 Raises the WindowsHookLib.MouseHook.MouseClick event.
 </summary>
	<param name="e">A System.Windows.Forms.MouseEventArgs
 that contains the event data.</param>
</member><member name="M:WindowsHook.MouseHook.OnMouseDoubleClick(System.Windows.Forms.MouseEventArgs)">
	<summary>
 Raises the WindowsHookLib.MouseHook.MouseDoubleClick event.
 </summary>
	<param name="e">A System.Windows.Forms.MouseEventArgs
 that contains the event data.</param>
</member><member name="M:WindowsHook.MouseHook.OnMouseWheel(WindowsHook.MouseEventArgs)">
	<summary>
 Raises the WindowsHookLib.MouseHook.MouseWheel event.
 </summary>
	<param name="e">A WindowsHookLib.MouseEventArgs
 that contains the event data.</param>
</member><member name="T:WindowsHook.MouseHook">
	<summary>
 The MouseHook class provides functionality to hook the mouse system wide (low level).
 </summary>
</member><member name="E:WindowsHook.KeyboardHook.StateChanged">
	<summary>
 Occurs when the KeyboardHook state changed.
 </summary>
</member><member name="E:WindowsHook.KeyboardHook.KeyDown">
	<summary>
 Occurs when a key is first pressed.
 </summary>
</member><member name="E:WindowsHook.KeyboardHook.KeyUp">
	<summary>
 Occurs when a key is released.
 </summary>
</member><member name="P:WindowsHook.KeyboardHook.Info">
	<summary>
 Gets the component's assembly information.
 </summary>
</member><member name="P:WindowsHook.KeyboardHook.AltKeyDown">
	<summary>
 Gets a Boolean value indicating if the ALT key is down.
 </summary>
</member><member name="P:WindowsHook.KeyboardHook.CtrlKeyDown">
	<summary>
 Gets a Boolean value indicating if the CTRL key is down.
 </summary>
</member><member name="P:WindowsHook.KeyboardHook.ShiftKeyDown">
	<summary>
 Gets a Boolean value indicating if the SHIFT key is down.
 </summary>
</member><member name="P:WindowsHook.KeyboardHook.State">
	<summary>
 Gets the state of the keyboard hook.
 </summary>
</member><member name="M:WindowsHook.KeyboardHook.InstallHook">
	<summary>
 Installs the keyboard hook for this application. 
 </summary>
</member><member name="M:WindowsHook.KeyboardHook.RemoveHook">
	<summary>
 Removes the keyboard hook for this application.
 </summary>
</member><member name="M:WindowsHook.KeyboardHook.OnStateChanged(WindowsHook.StateChangedEventArgs)">
	<summary>
 Raises the WindowsHookLib.KeyboardHook.StateChanged event.
 </summary>
	<param name="e">A WindowsHookLib.StateChangedEventArgs
 that contains the event data.</param>
</member><member name="M:WindowsHook.KeyboardHook.OnKeyUp(WindowsHook.KeyboardEventArgs)">
	<summary>
 Raises the WindowsHookLib.KeyboardHook.KeyUp event.
 </summary>
	<param name="e">A WindowsHookLib.KeyBoardEventArgs
 that contains the event data.</param>
</member><member name="M:WindowsHook.KeyboardHook.OnKeyDown(WindowsHook.KeyboardEventArgs)">
	<summary>
 Raises the WindowsHookLib.KeyboardHook.KeyDown event.
 </summary>
	<param name="e">A WindowsHookLib.KeyBoardEventArgs
 that contains the event data.</param>
</member><member name="T:WindowsHook.KeyboardHook">
	<summary>
 The KeyboardHook class provides functionality to hook the keyboard system wide (low level).
 </summary>
</member><member name="T:WindowsHook.HookState">
	<summary>
 Specifies constants that define the state of the hook.
 </summary>
</member><member name="M:WindowsHook.StateChangedEventArgs.#ctor(WindowsHook.HookState)">
	<param name="hookState">A WindowsHookLib.HookState enumeration 
 value representing the state of the hook.</param>
</member><member name="P:WindowsHook.StateChangedEventArgs.State">
	<summary>
 Gets a value indicating whether the hook is installed. 
 </summary>
</member><member name="T:WindowsHook.StateChangedEventArgs">
	<summary>
 Provides data for the WindowsHookLib.MouseHook.StateChanged,
 WindowsHookLib.KeyboardHook.StateChanged and WindowsHookLib.ClipboardHook.StateChanged events.
 </summary>
</member><member name="E:WindowsHook.ClipboardHook.StateChanged">
	<summary>
 Occurs when the ClipboardHook state changed.
 </summary>
</member><member name="E:WindowsHook.ClipboardHook.ClipboardChanged">
	<summary>
 Occurs when the clipboard contents is changed.
 </summary>
</member><member name="P:WindowsHook.ClipboardHook.Info">
	<summary>
 Gets the component's assembly information.
 </summary>
</member><member name="P:WindowsHook.ClipboardHook.State">
	<summary>
 Gets the state of the clipboard hook.
 </summary>
</member><member name="P:WindowsHook.ClipboardHook.HookedWindow">
	<summary>
 Gets the hooked window handle.
 </summary>
</member><member name="M:WindowsHook.ClipboardHook.InstallHook(System.Windows.Forms.Form)">
	<summary>
 Installs the clipboard hook for a window.
 </summary>
	<param name="window">
 A valid window (Form) within the solution associated with the ClipboardHook.
 </param>
</member><member name="M:WindowsHook.ClipboardHook.RemoveHook">
	<summary>
 Removes the clipboard hook for this window.
 </summary>
</member><member name="M:WindowsHook.ClipboardHook.RemoveHook(System.IntPtr)">
	<summary>
 Removes the clipboard hook for this window.
 </summary>
</member><member name="M:WindowsHook.ClipboardHook.OnStateChanged(WindowsHook.StateChangedEventArgs)">
	<summary>
 Raises the WindowsHookLib.ClipboardHook.StateChanged event.
 </summary>
	<param name="e">A WindowsHookLib.StateChangedEventArgs
 that contains the event data.</param>
</member><member name="M:WindowsHook.ClipboardHook.OnClipboardChanged(WindowsHook.ClipboardEventArgs)">
	<summary>
 Raises the WindowsHookLib.ClipboardHook.ClipboardChanged event.
 </summary>
	<param name="e">A WindowsHookLib.ClipboardEventArgs
 that contains the event data.</param>
</member><member name="T:WindowsHook.ClipboardHook">
	<summary>
 The ClipboardHook class provides functionality to hook a window to the clipboard chain.
 </summary>
</member><member name="M:WindowsHook.HandleChangedEventArgs.#ctor(System.IntPtr,System.IntPtr)">
	<param name="newHandle">The new handle.</param>
	<param name="oldHandle">The old handle.</param>
</member><member name="P:WindowsHook.HandleChangedEventArgs.OldHandle">
	<summary>
 Gets the old handle  of the object.
 </summary>
</member><member name="P:WindowsHook.HandleChangedEventArgs.NewHandle">
	<summary>
 Gets the new handle of the object.
 </summary>
</member><member name="T:WindowsHook.HandleChangedEventArgs">
	<summary>
 Provides data for the WindowsHookLib.ClipboardHook.HandleChanged events.
 </summary>
</member><member name="T:WindowsHook.ClipboardHookException">
	<summary>
 Represents errors that occur in WindowsHookLib.ClipboardHook.
 </summary>
</member><member name="T:WindowsHook.KeyboardHookException">
	<summary>
 Represents errors that occur in WindowsHookLib.KeyboardHook.
 </summary>
</member><member name="P:WindowsHook.My.Resources.Resources.ResourceManager">
	<summary>
  Returns the cached ResourceManager instance used by this class.
</summary>
</member><member name="P:WindowsHook.My.Resources.Resources.Culture">
	<summary>
  Overrides the current thread's CurrentUICulture property for all
  resource lookups using this strongly typed resource class.
</summary>
</member><member name="T:WindowsHook.My.Resources.Resources">
	<summary>
  A strongly-typed resource class, for looking up localized strings, etc.
</summary>
</member><member name="P:WindowsHook.ErrorLog.Title">
	<summary>
 Gets the title of the log file that leads the message(s).
 </summary>
</member><member name="P:WindowsHook.ErrorLog.Location">
	<summary>
 Gets the location (directory) for the log file.
 </summary>
</member><member name="P:WindowsHook.ErrorLog.FileName">
	<summary>
 Gets the log file's full name.
 </summary>
</member><member name="M:WindowsHook.ErrorLog.ExceptionToConsole(System.Exception,System.Diagnostics.TraceEventType)">
	<summary>
 Writes an exception information to the system's error and standard consoles.
 </summary>
	<param name="ex">The exception to write to console.</param>
	<param name="severity">The type of message. By default, System.Diagnostics.TraceEventType.Error.</param>
</member><member name="M:WindowsHook.ErrorLog.ExceptionToFile(System.Exception,System.Diagnostics.TraceEventType)">
	<summary>
 Writes an exception information to the application’s log file.
 </summary>
	<param name="ex">The exception to log.</param>
	<param name="severity">The type of message. By default, System.Diagnostics.TraceEventType.Error.</param>
</member><member name="M:WindowsHook.ErrorLog.EntryToConsole(System.String)">
	<summary>
 Writes a message to the system's error and standard consoles.
 </summary>
	<param name="message">The message to write to consoles.</param>
</member><member name="M:WindowsHook.ErrorLog.EntryToFile(System.String)">
	<summary>
 Writes a message to the applications log file.
 </summary>
	<param name="message">The message to log.</param>
</member><member name="M:WindowsHook.ErrorLog.EntryToConsole(System.String,System.Diagnostics.TraceEventType)">
	<summary>
 Writes a message to the system's error and standard consoles.
 </summary>
	<param name="message">The message to write to consoles. If message is Nothing, an empty string is used.</param>
	<param name="severity">The type of message. By default, System.Diagnostics.TraceEventType.Information.</param>
</member><member name="M:WindowsHook.ErrorLog.EntryToFile(System.String,System.Diagnostics.TraceEventType)">
	<summary>
 Writes a message to the applications log file.
 </summary>
	<param name="message">The message to log. If message is Nothing, an empty string is used.</param>
	<param name="severity">The type of message. By default, System.Diagnostics.TraceEventType.Information.</param>
</member><member name="T:WindowsHook.UnsafeNativeMethods.WKCallBack">
	<summary>
 Represents the method that will handle keyboard messages.
 </summary>
</member><member name="T:WindowsHook.UnsafeNativeMethods.WMCallBack">
	<summary>
 Represents the method that will handle mouse messages.
 </summary>
</member>
</members>
</doc>

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.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

VBDT
Software Developer (Senior) ZipEdTech
United States United States
No Biography provided

| Advertise | Privacy | Mobile
Web01 | 2.8.140916.1 | Last Updated 24 Sep 2010
Article Copyright 2007 by VBDT
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid