Example #1
0
        public void ClearMiracastPopup()
        {
            WindowControl wc = new WindowControl();

            if (wc.ActivateWindow("ApplicationFrameWindow", null))
            {
                Console.WriteLine("发现窗口ApplicationFrameTitleBarWindow");
                //Thread.Sleep(1000);
                MiracastEnter();
            }
        }
Example #2
0
 public void ClosePopup()
 {
     try
     {
         WindowControl wc = new WindowControl();
         wc.ActivateWindow("ApplicationFrameWindow", null);
         IntPtr ptr = wc.MyFindWindow("ApplicationFrameWindow", null);
         int    k   = 0; GetWindowThreadProcessId(ptr, out k);
         System.Diagnostics.Process p = System.Diagnostics.Process.GetProcessById(k);
         p.Kill();
     }
     catch (Exception e)
     {
     }
 }