Beispiel #1
0
        public static AppBarStates GetTaskBarState()
        {
            var msgData = new WinAPIFunctions.AppBarData();

            msgData.cbSize = (uint)Marshal.SizeOf(msgData);
            msgData.hWnd   = WinAPIFunctions.FindWindow("System_TrayWnd", null);
            return((AppBarStates)WinAPIFunctions.SHAppBarMessage((uint)AppBarMessages.GetState, ref msgData));
        }
Beispiel #2
0
        private static void SetTaskBarState(AppBarStates option)
        {
            var msgData = new WinAPIFunctions.AppBarData();

            msgData.cbSize = (uint)Marshal.SizeOf(msgData);
            msgData.hWnd   = WinAPIFunctions.FindWindow("System_TrayWnd", null);
            msgData.lParam = (int)option;
            WinAPIFunctions.SHAppBarMessage((uint)AppBarMessages.SetState, ref msgData);
        }