diff --git a/mRemoteV1/App/NativeMethods.cs b/mRemoteV1/App/NativeMethods.cs index 3cd20865f..cb4e2a458 100644 --- a/mRemoteV1/App/NativeMethods.cs +++ b/mRemoteV1/App/NativeMethods.cs @@ -106,7 +106,7 @@ namespace mRemoteNG.App public long y; } - private struct RECT + public struct RECT { public long left; public long top; @@ -167,17 +167,17 @@ namespace mRemoteNG.App #endregion #region ShowWindow - public const UInt32 SW_HIDE = 0; - public const UInt32 SW_SHOWNORMAL = 1; - public const UInt32 SW_SHOWMINIMIZED = 2; - public const UInt32 SW_SHOWMAXIMIZED = 3; - public const UInt32 SW_MAXIMIZE = 3; - public const UInt32 SW_SHOWNOACTIVATE = 4; - public const UInt32 SW_SHOW = 5; - public const UInt32 SW_MINIMIZE = 6; - public const UInt32 SW_SHOWMINNOACTIVE = 7; - public const UInt32 SW_SHOWNA = 8; - public const UInt32 SW_RESTORE = 9; + public const uint SW_HIDE = 0; + public const uint SW_SHOWNORMAL = 1; + public const uint SW_SHOWMINIMIZED = 2; + public const uint SW_SHOWMAXIMIZED = 3; + public const uint SW_MAXIMIZE = 3; + public const uint SW_SHOWNOACTIVATE = 4; + public const uint SW_SHOW = 5; + public const uint SW_MINIMIZE = 6; + public const uint SW_SHOWMINNOACTIVE = 7; + public const uint SW_SHOWNA = 8; + public const uint SW_RESTORE = 9; #endregion #region SetWindowPos / WM_WINDOWPOSCHANGING / WM_WINDOWPOSCHANGED @@ -268,9 +268,9 @@ namespace mRemoteNG.App #endregion #region Window Placement Flags (WPF) - public const UInt32 WPF_SETMINPOSITION = 0x1; - public const UInt32 WPF_RESTORETOMAXIMIZED = 0x2; - public const UInt32 WPF_ASYNCWINDOWPLACEMENT = 0x4; + public const uint WPF_SETMINPOSITION = 0x1; + public const uint WPF_RESTORETOMAXIMIZED = 0x2; + public const uint WPF_ASYNCWINDOWPLACEMENT = 0x4; #endregion #region WM_ACTIVATE diff --git a/mRemoteV1/App/ProgramRoot.cs b/mRemoteV1/App/ProgramRoot.cs index c6283081b..038e32211 100644 --- a/mRemoteV1/App/ProgramRoot.cs +++ b/mRemoteV1/App/ProgramRoot.cs @@ -54,7 +54,7 @@ namespace mRemoteNG.App if (singletonInstanceWindowHandle != IntPtr.Zero) { if (NativeMethods.IsIconic(singletonInstanceWindowHandle) != 0) - NativeMethods.ShowWindow(singletonInstanceWindowHandle, NativeMethods.SW_RESTORE); + NativeMethods.ShowWindow(singletonInstanceWindowHandle, (int)NativeMethods.SW_RESTORE); } } diff --git a/mRemoteV1/Tools/ProcessController.cs b/mRemoteV1/Tools/ProcessController.cs index be96f2adf..d275f4d28 100644 --- a/mRemoteV1/Tools/ProcessController.cs +++ b/mRemoteV1/Tools/ProcessController.cs @@ -34,12 +34,12 @@ namespace mRemoteNG.Tools if (controlHandle == IntPtr.Zero) return false; - int nCmdShow = 0; + uint nCmdShow = 0; if (visible) nCmdShow = NativeMethods.SW_SHOW; else nCmdShow = NativeMethods.SW_HIDE; - NativeMethods.ShowWindow(controlHandle, nCmdShow); + NativeMethods.ShowWindow(controlHandle, (int)nCmdShow); return true; }