Exemplo n.º 1
0
        /// <summary>
        /// 最大最小化
        /// </summary>

        static void ShowWindow()
        {
            var winBar = WinApi.FindWindow(null, "Form1Text");
            var childs = WinApi.FindChildBar(winBar);

            WinApi.SendMessage(childs[childs.Count - 1], 0x0C, IntPtr.Zero, "chenchang");
            for (var i = 0; i < 1; i++)
            {
                WinApi.ShowWindow(winBar, 2); //最小
                Thread.Sleep(1000);
                WinApi.ShowWindow(winBar, 3); //最大
                Thread.Sleep(1000);
            }
        }