Example #1
0
        static void Main(string[] args)
        {
            Console.Title = "123";
            IntPtr intptr = User32Extension.FindWindow(null, "123");

            intptr = User32Extension.FindWindow("ConsoleWindowClass", null);

            //if (intptr != IntPtr.Zero)
            //{
            //    Console.WriteLine("找到");
            //    User32Extension.FlashWindow(intptr, true);
            //}
            //else
            //{
            //    Console.WriteLine("没找到");
            //}


            var vvv = GetAllDesktopWindows().Where(p => p.szWindowName == "微信");

            foreach (var item in vvv)
            {
                Console.WriteLine(string.Format("hWnd:{0,-10}   className:{1,-20}   WindowName:{2}", item.hWnd, item.szClassName, item.szWindowName));
                User32Extension.FlashWindow(item.hWnd, true);
            }

            Console.ReadKey();
        }
Example #2
0
 private void FrmTest_Load(object sender, EventArgs e)
 {
     User32Extension.AnimateWindow(this.Handle, 1000, AnimateWindowFlags.AW_CENTER);
 }
Example #3
0
 private void button1_Click(object sender, EventArgs e)
 {
     User32Extension.FlashWindow(this.Handle, true);
 }
 static RawInputExample()
 {
     DevicesName = User32Extension.GetRawInputDevicesName();
     DevicesInfo = User32Extension.GetRawIntputDevicesInfo();
 }