示例#1
0
        private static IntPtr FindHandle()
        {
            IntPtr intPtr  = Client.FindWindowA("Ultima Online", null);
            IntPtr intPtr1 = intPtr;

            if (Client.IsWindow(intPtr) != 0)
            {
                return(intPtr1);
            }
            IntPtr intPtr2 = Client.FindWindowA("Ultima Online Third Dawn", null);

            intPtr1 = intPtr2;
            if (Client.IsWindow(intPtr2) != 0)
            {
                return(intPtr1);
            }
            return(IntPtr.Zero);
        }
示例#2
0
        private static IntPtr FindHandle()
        {
            IntPtr windowA1;

            if (Client.IsWindow(windowA1 = Client.FindWindowA("Ultima Online", (string)null)) != 0)
            {
                return(windowA1);
            }
            IntPtr windowA2;

            if (Client.IsWindow(windowA2 = Client.FindWindowA("Ultima Online Third Dawn", (string)null)) != 0)
            {
                return(windowA2);
            }
            else
            {
                return(IntPtr.Zero);
            }
        }