Exemplo n.º 1
0
        internal static bool TrySetFormBoundsToMatchParent(Form form, IntPtr parentHandle)
        {
            Rectangle parentBounds;

            if (!USER32.GetClientRect(parentHandle, out parentBounds))
            {
                return(false);
            }
            form.Bounds = parentBounds;
            return(true);
        }