Exemplo n.º 1
0
        /// <summary>
        /// 设置窗口尺寸
        /// </summary>
        /// <param name="width">窗口宽度</param>
        /// <param name="height">窗口高度</param>
        /// <returns></returns>
        public bool SetSize(int width, int height)
        {
            if (!IsAlive)
            {
                return false;
            }

            Dm.SetWindowSize(_hwnd, width, height);
            Tuple<int, int, int, int> rect = Rect;
            return rect.Item3 - rect.Item1 == width && rect.Item4 - rect.Item2 == height;
        }