Esempio n. 1
0
        //***************************************************************************
        // USER32 - Graphics Functions
        //
        public static Rectangle GetWindowRect(IntPtr hWnd)
        {
            RECT bnds = new RECT();

            if (Api_User32.GetWindowRect(hWnd, ref bnds))
            {
                return(new Rectangle(bnds.left, bnds.top, bnds.Width, bnds.Height));
            }
            else
            {
                return(Rectangle.Empty);
            }
        }