示例#1
0
        private void SparTaskMenuClose(object sender, EventArgs e)
        {
            System.Windows.Forms.MenuItem item = (System.Windows.Forms.MenuItem)sender;
            System.Windows.Forms.Button   b    = (System.Windows.Forms.Button)item.Tag;
            ArrayList Item = (ArrayList)b.Tag;

            WinAPI.SendMessageTimeout((IntPtr)Item[1], 0x0010, IntPtr.Zero, IntPtr.Zero);
        }
示例#2
0
        public void SparTaskHideAll(object sender, EventArgs e)
        {
            IntPtr lHwnd = WinAPI.FindWindow("Shell_TrayWnd", null);

            if (System.Windows.Input.Keyboard.IsKeyDown(System.Windows.Input.Key.LeftShift))
            {
                WinAPI.SendMessageTimeout(lHwnd, WinAPI.WM_COMMAND, (IntPtr)WinAPI.MIN_ALL_UNDO, IntPtr.Zero);
            }
            else
            {
                WinAPI.SendMessageTimeout(lHwnd, WinAPI.WM_COMMAND, (IntPtr)WinAPI.MIN_ALL, IntPtr.Zero);
            }
        }