close

        [System.Runtime.InteropServices.DllImport("user32.dll", SetLastError = true)]

        public static extern IntPtr FindWindow(string lpClassName, string lpWindowName);

        [System.Runtime.InteropServices.DllImport("user32.dll")]

        public static extern bool EndWindow(IntPtr hDlg, out IntPtr nResult);

 

//使用方式

        IntPtr dig = FindWindow(null, Form.name);

        if(dig != IntPtr.ZERO)

        {

            IntPtr resurt;

            EndWindow(dig, out result);

        }

arrow
arrow
    全站熱搜

    Big Bear 發表在 痞客邦 留言(0) 人氣()