private static WindowWndProcHandler.TaskbarLocation GetTaskbarPosition()
 {
     WindowWndProcHandler.TaskbarLocation taskbarLocation = WindowWndProcHandler.TaskbarLocation.None;
     WindowWndProcHandler.APPBARDATA      data            = new WindowWndProcHandler.APPBARDATA();
     data.cbSize = Marshal.SizeOf((object)data);
     if (NativeMethods.SHAppBarMessage(5, ref data) == IntPtr.Zero)
     {
         return(taskbarLocation);
     }
     if (data.rc.Left == data.rc.Top)
     {
         if (data.rc.Right < data.rc.Bottom)
         {
             taskbarLocation = WindowWndProcHandler.TaskbarLocation.Left;
         }
         if (data.rc.Right > data.rc.Bottom)
         {
             taskbarLocation = WindowWndProcHandler.TaskbarLocation.Top;
         }
     }
     if (data.rc.Left > data.rc.Top)
     {
         taskbarLocation = WindowWndProcHandler.TaskbarLocation.Right;
     }
     if (data.rc.Left < data.rc.Top)
     {
         taskbarLocation = WindowWndProcHandler.TaskbarLocation.Bottom;
     }
     return(taskbarLocation);
 }
Beispiel #2
0
 internal static extern IntPtr SHAppBarMessage(
     int msg,
     ref WindowWndProcHandler.APPBARDATA data);