示例#1
0
        private static void InternalSetAutoHide(bool hide) {
            var data = new NativeMethods.APPBARDATA {
                                                        lParam =
                                                            hide
                                                                ? NativeMethods.ABS.Autohide
                                                                : NativeMethods.ABS.AlwaysOnTop
                                                    };
            NativeMethods.SHAppBarMessage(NativeMethods.ABM.SetState, ref data);

            UpdateTaskbar();
        }
示例#2
0
        private static bool InternalGetAutoHide() {
            var data = new NativeMethods.APPBARDATA();
            var result = NativeMethods.SHAppBarMessage(NativeMethods.ABM.GetState, ref data);

            return (result.ToInt32() & NativeMethods.ABS.Autohide) == NativeMethods.ABS.Autohide;
        }
示例#3
0
        private static TaskbarLocation InternalGetLocation() {
            var data = new NativeMethods.APPBARDATA();
            NativeMethods.SHAppBarMessage(NativeMethods.ABM.GetTaskbarPos, ref data);

            return (TaskbarLocation) data.uEdge;
        }