Exemplo n.º 1
0
        public void GetPosition(string strClassName, string strWindowName)
        {
            m_data = new APPBARDATA();
            m_data.cbSize = Marshal.SizeOf(typeof(APPBARDATA));
            var hWnd = WinApi.FindWindow(strClassName, strWindowName);

            if (hWnd != IntPtr.Zero && WinApi.SHAppBarMessage(WinApi.ABM_GETTASKBARPOS, ref m_data) != 1)
                throw new Exception("Failed to communicate with the given AppBar");
        }
Exemplo n.º 2
0
 internal static extern UInt32 SHAppBarMessage(uint dwMessage, ref APPBARDATA data);