Exemplo n.º 1
0
        /// <summary>
        /// Gets a handle for a given window name.  Will return InPtr.Zero if no match is found.
        /// </summary>
        /// <param name="WindowName">Name of the window.</param>
        /// <returns></returns>
        public static IntPtr HisHandle(string WindowName)
        {
            IntPtr p = IntPtr.Zero;

            try
            {
                p = WMUtil.FindWindow(null, WindowName);
            }
            catch (NullReferenceException) { }
            return(p);
        }