Exemple #1
0
        public static void SendMessage(AppCommandCode command)
        {
            if (command == AppCommandCode.None)
                throw new ArgumentException("A command is required", "command");

            var commandId = (IntPtr)((int)command << 16);
            SendMessageW(App.MainWindowHandle, WM_APPCOMMAND, App.MainWindowHandle, commandId);
        }
Exemple #2
0
        public static void SendMessage(AppCommandCode command)
        {
            if (command == AppCommandCode.None)
            {
                throw new ArgumentException("A command is required", "command");
            }

            var commandId = (IntPtr)((int)command << 16);

            SendMessageW(App.MainWindowHandle, WM_APPCOMMAND, App.MainWindowHandle, commandId);
        }