Add function to send system commands to a window

This commit is contained in:
2015-06-13 07:59:51 -04:00
parent bffe0654ce
commit 00c0981034
2 changed files with 31 additions and 0 deletions

View File

@@ -69,6 +69,11 @@ namespace Common.Native
User32.SetWindowPlacement(hWnd, ref windowPlacement);
}
public static void SystemCommand(IntPtr hWnd, Constants.SysCommand command)
{
User32.SendMessage(hWnd, (uint) Constants.WindowMessage.SysCommand, (IntPtr) command, IntPtr.Zero);
}
public static Icon GetSmallIcon(IntPtr hWnd)
{
try