Пример #1
0
 public static void HideTaskBar()
 {
     m_hTaskBar = WinAPI.FindWindow("Shell_TrayWnd", null);
     if (m_hTaskBar != IntPtr.Zero)
     {
         WinAPI.ShowWindow(m_hTaskBar, (int)WinAPI.WindowShowStyle.Hide);
     }
 }
Пример #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);
            }
        }