diff --git a/PInvoke/Shared/WinUser/MouseButtonState.cs b/PInvoke/Shared/WinUser/MouseButtonState.cs
new file mode 100644
index 00000000..128f57ae
--- /dev/null
+++ b/PInvoke/Shared/WinUser/MouseButtonState.cs
@@ -0,0 +1,31 @@
+using System;
+
+namespace Vanara.PInvoke
+{
+ /// The state of the other mouse buttons plus the SHIFT and CTRL keys.
+ [PInvokeData("winuser.h")]
+ [Flags]
+ public enum MouseButtonState
+ {
+ /// The left mouse button is down.
+ MK_LBUTTON = 0x0001,
+
+ /// The right mouse button is down.
+ MK_RBUTTON = 0x0002,
+
+ /// The SHIFT key is down.
+ MK_SHIFT = 0x0004,
+
+ /// The CTRL key is down.
+ MK_CONTROL = 0x0008,
+
+ /// The middle mouse button is down.
+ MK_MBUTTON = 0x0010,
+
+ /// The XBUTTON1 button is down.
+ MK_XBUTTON1 = 0x0020,
+
+ /// The XBUTTON2 button is down.
+ MK_XBUTTON2 = 0x0040,
+ }
+}
\ No newline at end of file
diff --git a/PInvoke/Shell32/ShObjIdl.IExecuteCommand.cs b/PInvoke/Shell32/ShObjIdl.IExecuteCommand.cs
index 59e52486..1e3153b7 100644
--- a/PInvoke/Shell32/ShObjIdl.IExecuteCommand.cs
+++ b/PInvoke/Shell32/ShObjIdl.IExecuteCommand.cs
@@ -72,7 +72,7 @@ namespace Vanara.PInvoke
// https://docs.microsoft.com/en-us/windows/desktop/api/shobjidl_core/nf-shobjidl_core-iexecutecommand-setkeystate HRESULT
// SetKeyState( DWORD grfKeyState );
[PreserveSig]
- HRESULT SetKeyState(User32.MouseButtonState grfKeyState);
+ HRESULT SetKeyState(MouseButtonState grfKeyState);
/// Provides parameter values for the verb.
///
diff --git a/PInvoke/User32/WinUser.Mouse.cs b/PInvoke/User32/WinUser.Mouse.cs
index 6c99b2e1..fcd2687f 100644
--- a/PInvoke/User32/WinUser.Mouse.cs
+++ b/PInvoke/User32/WinUser.Mouse.cs
@@ -19,33 +19,6 @@ namespace Vanara.PInvoke
GMMP_USE_HIGH_RESOLUTION_POINTS = 2,
}
- /// The state of the other mouse buttons plus the SHIFT and CTRL keys.
- [PInvokeData("winuser.h")]
- [Flags]
- public enum MouseButtonState
- {
- /// The left mouse button is down.
- MK_LBUTTON = 0x0001,
-
- /// The right mouse button is down.
- MK_RBUTTON = 0x0002,
-
- /// The SHIFT key is down.
- MK_SHIFT = 0x0004,
-
- /// The CTRL key is down.
- MK_CONTROL = 0x0008,
-
- /// The middle mouse button is down.
- MK_MBUTTON = 0x0010,
-
- /// The XBUTTON1 button is down.
- MK_XBUTTON1 = 0x0020,
-
- /// The XBUTTON2 button is down.
- MK_XBUTTON2 = 0x0040,
- }
-
/// Controls various aspects of mouse motion and button clicking.
[PInvokeData("winuser.h", MSDNShortId = "")]
[Flags]
diff --git a/Windows.Shell/ShellExtensions/ShellExecuteCommand.cs b/Windows.Shell/ShellExtensions/ShellExecuteCommand.cs
index a1569e99..56a94d63 100644
--- a/Windows.Shell/ShellExtensions/ShellExecuteCommand.cs
+++ b/Windows.Shell/ShellExtensions/ShellExecuteCommand.cs
@@ -88,7 +88,7 @@ namespace Vanara.Windows.Shell
/// Gets a value based on the current state of the keys CTRL and SHIFT.
/// The value based on the current state of the keys CTRL and SHIFT.
- public User32.MouseButtonState KeyState { get; private set; }
+ public MouseButtonState KeyState { get; private set; }
/// Gets a new working directory. This value is if the current working directory is to be used.
/// Returns a value.
@@ -149,7 +149,7 @@ namespace Vanara.Windows.Shell
}
///
- HRESULT IExecuteCommand.SetKeyState(User32.MouseButtonState grfKeyState)
+ HRESULT IExecuteCommand.SetKeyState(MouseButtonState grfKeyState)
{
KeyState = grfKeyState;
return HRESULT.S_OK;