private static void SetState(int state) { TaskbarSettings.APPBARDATA aPPBARDATA = default(TaskbarSettings.APPBARDATA); aPPBARDATA.cbSize = Marshal.SizeOf(aPPBARDATA); IntPtr lParam = new IntPtr(state); aPPBARDATA.lParam = lParam; TaskbarSettings.SHAppBarMessage(10, ref aPPBARDATA); }
private static int GetState() { TaskbarSettings.APPBARDATA aPPBARDATA = default(TaskbarSettings.APPBARDATA); aPPBARDATA.cbSize = Marshal.SizeOf(aPPBARDATA); return(TaskbarSettings.SHAppBarMessage(4, ref aPPBARDATA)); }
private static extern int SHAppBarMessage(int message, ref TaskbarSettings.APPBARDATA data);