Click here to Skip to main content
15,887,386 members
Articles / Programming Languages / XML

Global Windows Hooks

Rate me:
Please Sign up or sign in to vote.
4.80/5 (60 votes)
24 Sep 2010CPOL5 min read 393.4K   11.7K   228  
A single component that contains various Windows hooks
<?xml version="1.0"?>
<doc>
    <assembly>
        <name>WindowsHookLib</name>
    </assembly>
    <members>
        <member name="T:WindowsHookLib.MouseHook">
            <summary>
            Provides functionality to hook the mouse system wide (low level).
            </summary>
        </member>
        <member name="F:WindowsHookLib.MouseHook.components">
            <summary>
            Required designer variable.
            </summary>
        </member>
        <member name="M:WindowsHookLib.MouseHook.Dispose(System.Boolean)">
            <summary> 
            Clean up any resources being used.
            </summary>
            <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        </member>
        <member name="M:WindowsHookLib.MouseHook.InitializeComponent">
            <summary>
            Required method for Designer support - do not modify
            the contents of this method with the code editor.
            </summary>
        </member>
        <member name="M:WindowsHookLib.MouseHook.#ctor">
            <summary>
            Default constructor.
            </summary>
        </member>
        <member name="M:WindowsHookLib.MouseHook.InstallHook">
            <summary>
            Installs the mouse hook for this application.
            </summary>
        </member>
        <member name="M:WindowsHookLib.MouseHook.RemoveHook">
            <summary>
            Removes the mouse hook for this application.
            </summary>
        </member>
        <member name="M:WindowsHookLib.MouseHook.SafeRemove">
            <summary>
            Safely removes the hook without throwing exception.
            </summary>
        </member>
        <member name="M:WindowsHookLib.MouseHook.GetMouseDownArgs(WindowsHookLib.UnsafeNativeMethods.MouseInfo,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:WindowsHookLib.MouseHook.GetMouseUpArgs(WindowsHookLib.UnsafeNativeMethods.MouseInfo,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:WindowsHookLib.MouseHook.OnMouseClick(WindowsHookLib.UnsafeNativeMethods.MouseInfo,System.Windows.Forms.MouseButtons)">
            <summary>
            Checks the mouse up data and calls OnMouseclick or OnMouseDoubleClick events.
            </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:WindowsHookLib.MouseHook.SynthesizeMouseDown(System.Windows.Forms.MouseButtons)">
            <summary>
            Synthesizes a mouse down event system wide.
            </summary>
            <param name="button">A Windows.Forms.MouseButton that should be down.</param>
        </member>
        <member name="M:WindowsHookLib.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:WindowsHookLib.MouseHook.SynthesizeMouseUp(System.Windows.Forms.MouseButtons)">
            <summary>
            Synthesizes a mouse up event system wide.
            </summary>
            <param name="button">A Windows.Forms.MouseButton that should be up.</param>
        </member>
        <member name="M:WindowsHookLib.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:WindowsHookLib.MouseHook.SynthesizeMouseWheel(System.Int32)">
            <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>
        </member>
        <member name="M:WindowsHookLib.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:WindowsHookLib.MouseHook.SynthesizeMouseMove(System.Drawing.Point,WindowsHookLib.MapOn)">
            <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>
        </member>
        <member name="M:WindowsHookLib.MouseHook.SynthesizeMouseMove(System.Drawing.Point,WindowsHookLib.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:WindowsHookLib.MouseHook.OnStateChanged(WindowsHookLib.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:WindowsHookLib.MouseHook.OnMouseMove(WindowsHookLib.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:WindowsHookLib.MouseHook.OnMouseDown(WindowsHookLib.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:WindowsHookLib.MouseHook.OnMouseUp(WindowsHookLib.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:WindowsHookLib.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:WindowsHookLib.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:WindowsHookLib.MouseHook.OnMouseWheel(WindowsHookLib.MouseEventArgs)">
            <summary>
            Raises the WindowsHookLib.MouseHook.MouseWheel event.
            </summary>
            <param name="e">A WindowsHookLib.MouseEventArgs
            that contains the event data.</param>
        </member>
        <member name="E:WindowsHookLib.MouseHook.StateChanged">
            <summary>
            Occurs when the MouseHook state changed.
            </summary>
        </member>
        <member name="E:WindowsHookLib.MouseHook.MouseDown">
            <summary>
            Occurs when a mouse button is down.
            </summary>
        </member>
        <member name="E:WindowsHookLib.MouseHook.MouseMove">
            <summary>
            Occurs when the mouse pointer is moved.
            </summary>
        </member>
        <member name="E:WindowsHookLib.MouseHook.MouseUp">
            <summary>
            Occurs when a mouse button is up.
            </summary>
        </member>
        <member name="E:WindowsHookLib.MouseHook.MouseWheel">
            <summary>
            Occurs when the mouse wheel is rotated.
            </summary>
        </member>
        <member name="E:WindowsHookLib.MouseHook.MouseClick">
            <summary>
            Occurs when a mouse button is clicked.
            </summary>
        </member>
        <member name="E:WindowsHookLib.MouseHook.MouseDoubleClick">
            <summary>
            Occurs when a mouse button is double clicked.
            </summary>
        </member>
        <member name="P:WindowsHookLib.MouseHook.AssemblyInfo">
            <summary>
            Gets the component's assembly information.
            </summary>
        </member>
        <member name="P:WindowsHookLib.MouseHook.State">
            <summary>
            Gets the state of the hook.
            </summary>
        </member>
        <member name="T:WindowsHookLib.MouseHook.MouseMessageEventHandler">
            <summary>
            Represents the method that will handle the mouse message event.
            </summary>
        </member>
        <member name="T:WindowsHookLib.ClipboardHook">
            <summary>
            Provides functionality to hook a window to the clipboard chain.
            </summary>
        </member>
        <member name="M:WindowsHookLib.ClipboardHook.#ctor">
            <summary>
            Default constructor.
            </summary>
        </member>
        <member name="M:WindowsHookLib.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:WindowsHookLib.ClipboardHook.RemoveHook">
            <summary>
            Removes the clipboard hook for this window.
            </summary>
        </member>
        <member name="M:WindowsHookLib.ClipboardHook.SafeRemove">
            <summary>
            Safely removes the hook without throwing exception.
            </summary>
        </member>
        <member name="M:WindowsHookLib.ClipboardHook.OnStateChanged(WindowsHookLib.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:WindowsHookLib.ClipboardHook.OnClipboardChanged(WindowsHookLib.ClipboardEventArgs)">
            <summary>
            Raises the WindowsHookLib.ClipboardHook.ClipboardChanged event.
            </summary>
            <param name="e">A WindowsHookLib.ClipboardEventArgs
            that contains the event data.</param>
        </member>
        <member name="F:WindowsHookLib.ClipboardHook.components">
            <summary>
            Required designer variable.
            </summary>
        </member>
        <member name="M:WindowsHookLib.ClipboardHook.Dispose(System.Boolean)">
            <summary> 
            Clean up any resources being used.
            </summary>
            <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        </member>
        <member name="M:WindowsHookLib.ClipboardHook.InitializeComponent">
            <summary>
            Required method for Designer support - do not modify
            the contents of this method with the code editor.
            </summary>
        </member>
        <member name="E:WindowsHookLib.ClipboardHook.StateChanged">
            <summary>
            Occurs when the ClipboardHook state changed.
            </summary>
        </member>
        <member name="E:WindowsHookLib.ClipboardHook.ClipboardChanged">
            <summary>
            Occurs when the clipboard contents is changed.
            </summary>
        </member>
        <member name="P:WindowsHookLib.ClipboardHook.AssemblyInfo">
            <summary>
            Gets the component's assembly information.
            </summary>
        </member>
        <member name="P:WindowsHookLib.ClipboardHook.State">
            <summary>
            Gets the state of the hook.
            </summary>
        </member>
        <member name="P:WindowsHookLib.ClipboardHook.HookedWindow">
            <summary>
            Gets the hooked window handle.
            </summary>
        </member>
        <member name="T:WindowsHookLib.Properties.Resources">
            <summary>
              A strongly-typed resource class, for looking up localized strings, etc.
            </summary>
        </member>
        <member name="P:WindowsHookLib.Properties.Resources.ResourceManager">
            <summary>
              Returns the cached ResourceManager instance used by this class.
            </summary>
        </member>
        <member name="P:WindowsHookLib.Properties.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:WindowsHookLib.KeyboardHook">
            <summary>
            Provides functionality to hook the keyboard system wide (low level).
            </summary>
        </member>
        <member name="M:WindowsHookLib.KeyboardHook.#ctor">
            <summary>
            Default constructor.
            </summary>
        </member>
        <member name="M:WindowsHookLib.KeyboardHook.InstallHook">
            <summary>
            Installs the keyboard hook for this application. 
            </summary>
        </member>
        <member name="M:WindowsHookLib.KeyboardHook.RemoveHook">
            <summary>
            Removes the keyboard hook for this application.
            </summary>
        </member>
        <member name="M:WindowsHookLib.KeyboardHook.SafeRemove">
            <summary>
            Safely removes the hook without throwing exception.
            </summary>
        </member>
        <member name="M:WindowsHookLib.KeyboardHook.OnStateChanged(WindowsHookLib.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:WindowsHookLib.KeyboardHook.OnKeyUp(WindowsHookLib.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:WindowsHookLib.KeyboardHook.OnKeyDown(WindowsHookLib.KeyboardEventArgs)">
            <summary>
            Raises the WindowsHookLib.KeyboardHook.KeyDown event.
            </summary>
            <param name="e">A WindowsHookLib.KeyBoardEventArgs
            that contains the event data.</param>
        </member>
        <member name="F:WindowsHookLib.KeyboardHook.components">
            <summary>
            Required designer variable.
            </summary>
        </member>
        <member name="M:WindowsHookLib.KeyboardHook.Dispose(System.Boolean)">
            <summary> 
            Clean up any resources being used.
            </summary>
            <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        </member>
        <member name="M:WindowsHookLib.KeyboardHook.InitializeComponent">
            <summary>
            Required method for Designer support - do not modify
            the contents of this method with the code editor.
            </summary>
        </member>
        <member name="E:WindowsHookLib.KeyboardHook.StateChanged">
            <summary>
            Occurs when the KeyboardHook state changed.
            </summary>
        </member>
        <member name="E:WindowsHookLib.KeyboardHook.KeyDown">
            <summary>
            Occurs when a key is first pressed.
            </summary>
        </member>
        <member name="E:WindowsHookLib.KeyboardHook.KeyUp">
            <summary>
            Occurs when a key is released.
            </summary>
        </member>
        <member name="P:WindowsHookLib.KeyboardHook.AssemblyInfo">
            <summary>
            Gets the component's assembly information.
            </summary>
        </member>
        <member name="P:WindowsHookLib.KeyboardHook.AltKeyDown">
            <summary>
            Gets a Boolean value indicating if the ALT key is down.
            </summary>
        </member>
        <member name="P:WindowsHookLib.KeyboardHook.CtrlKeyDown">
            <summary>
            Gets a Boolean value indicating if the CTRL key is down.
            </summary>
        </member>
        <member name="P:WindowsHookLib.KeyboardHook.ShiftKeyDown">
            <summary>
            Gets a Boolean value indicating if the SHIFT key is down.
            </summary>
        </member>
        <member name="P:WindowsHookLib.KeyboardHook.State">
            <summary>
            Gets the state of the hook.
            </summary>
        </member>
        <member name="T:WindowsHookLib.KeyboardHook.KeyboardMessageEventHandler">
            <summary>
            Represents the method that will handle the keyboard message event.
            </summary>
        </member>
        <member name="T:WindowsHookLib.ClipboardEventArgs">
            <summary>
            Provides data for the WindowsHookLib.ClipboardHook.ClipboardChanged event.
            </summary>
        </member>
        <member name="M:WindowsHookLib.ClipboardEventArgs.#ctor(System.IntPtr)">
            <param name="sourceWindow">The window handle that has set the last clipboard data.</param>
        </member>
        <member name="P:WindowsHookLib.ClipboardEventArgs.SourceWindow">
            <summary>
            Gets the window handle that has set the last clipboard data.
            </summary>
        </member>
        <member name="T:WindowsHookLib.WindowsHookException">
            <summary>
            Represents errors that occur in WindowsHookLib.ClipboardHook, 
            WindowsHookLib.MouseHook and WindowsHookLib.KeyboardHook.
            </summary>
        </member>
        <member name="M:WindowsHookLib.WindowsHookException.#ctor">
            <summary>
            Default constructor.
            </summary>
        </member>
        <member name="M:WindowsHookLib.WindowsHookException.#ctor(System.String)">
            <param name="message">The exception message.</param>
        </member>
        <member name="M:WindowsHookLib.WindowsHookException.#ctor(System.String,System.Exception)">
            <param name="message">The exception message.</param>
            <param name="innerException">The inner exception.</param>
        </member>
        <member name="M:WindowsHookLib.WindowsHookException.#ctor(System.String,System.String)">
            <param name="message">The exception message.</param>
            <param name="parameterName">The invalid parameter name.</param>
        </member>
        <member name="M:WindowsHookLib.WindowsHookException.#ctor(System.String,System.String,System.Object)">
            <param name="message">The exception message.</param>
            <param name="parameterName">The invalid parameter name.</param>
            <param name="actualValue">The parameter value.</param>
        </member>
        <member name="M:WindowsHookLib.WindowsHookException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
            <param name="info">The serialization information.</param>
            <param name="context"></param>
        </member>
        <member name="M:WindowsHookLib.WindowsHookException.GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
            <summary>
            Sets the System.Runtime.Serialization.SerializationInfo object 
            with the parameter name, actual value and additional exception information.
            </summary>
            <param name="info">The object that holds the serialized object data.</param>
            <param name="context">The contextual information about the source or destination.</param>
        </member>
        <member name="P:WindowsHookLib.WindowsHookException.ActualValue">
            <summary>
            Gets the actural value of the parameter that causes this exception.
            </summary>
        </member>
        <member name="P:WindowsHookLib.WindowsHookException.Message">
            <summary>
            Gets the error message of the exception.
            </summary>
        </member>
        <member name="T:WindowsHookLib.HookState">
            <summary>
            Specifies constants that define the state of the hook.
            </summary>
        </member>
        <member name="F:WindowsHookLib.HookState.Uninstalled">
            <summary>
            The unistalled state.
            </summary>
        </member>
        <member name="F:WindowsHookLib.HookState.Installed">
            <summary>
            The installed state.
            </summary>
        </member>
        <member name="T:WindowsHookLib.StateChangedEventArgs">
            <summary>
            Provides data for the WindowsHookLib.MouseHook.StateChanged, 
            WindowsHookLib.KeyboardHook.StateChanged and WindowsHookLib.ClipboardHook.StateChanged events.
            </summary>
        </member>
        <member name="M:WindowsHookLib.StateChangedEventArgs.#ctor(WindowsHookLib.HookState)">
            <param name="hookState">A WindowsHookLib.HookState enumeration 
            value representing the state of the hook.</param>
        </member>
        <member name="P:WindowsHookLib.StateChangedEventArgs.State">
            <summary>
            Gets a value indicating whether the hook is installed. 
            </summary>
        </member>
        <member name="T:WindowsHookLib.MapOn">
            <summary>
            Represents mouse coordinate mapping enumatation.
            </summary>
        </member>
        <member name="F:WindowsHookLib.MapOn.Relative">
            <summary>
            Maps the mouse coordinates relative to the previous mouse event (the last reported position). 
            Positive values mean the mouse moved right (or down); negative values mean the mouse moved left (or up). 
            </summary>
        </member>
        <member name="F:WindowsHookLib.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:WindowsHookLib.MapOn.VirtualDesktop">
            <summary>
            Maps the mouse coordinates to the entire virtual desktop (multimonitor system).
            </summary>
        </member>
        <member name="T:WindowsHookLib.MouseEventArgs">
            <summary>
            Provides data for the WindowsHookLib.MouseHook.MouseDown, 
            WindowsHookLib.MouseHook.MouseUp, WindowsHookLib.MouseHook.MouseMove 
            and WindowsHookLib.MouseHook.MouseWheel events. 
            </summary>
        </member>
        <member name="M:WindowsHookLib.MouseEventArgs.#ctor(System.Windows.Forms.MouseButtons,System.Int32,System.Drawing.Point,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="pt">The coordinate point 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:WindowsHookLib.MouseEventArgs.Handled">
            <summary>
            Gets or sets a value indicating whether the event was handled.
            </summary>
        </member>
        <member name="T:WindowsHookLib.KeyboardEventArgs">
            <summary>
            Provides data for the WindowsHookLib.KeyboardHook.KeyDown and 
            WindowsHookLib.KeyboardHook.KeyUp events. 
            </summary>
        </member>
        <member name="M:WindowsHookLib.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>
            <param name="virtualKeyCode">The virtual key code.</param>
        </member>
        <member name="P:WindowsHookLib.KeyboardEventArgs.SuppressKeyPress">
            <summary>
            Gets or sets a value indicating whether the event was handled.
            </summary>
        </member>
        <member name="P:WindowsHookLib.KeyboardEventArgs.VirtualKeyCode">
            <summary>
            Gets the virtual key code for a KeyDown or KeyUp event.
            </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)


Written By
Software Developer (Senior) ZipEdTech
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions