Esempio n. 1
0
        private void button9_Click(object sender, EventArgs e)
        {
            Win32API.CloseWindow(button1.Handle);
            Win32API.CloseWindow(button2.Handle);
            Win32API.CloseWindow(button3.Handle);
            System.Threading.Thread.Sleep(3 * 1000);
            uint result = Win32API.ArrangeIconicWindows(this.Handle);

            Console.WriteLine(result);
        }
 protected void CloseWindow()
 {
     if (timerFindApp != null)
     {
         timerFindApp.Dispose();
         timerFindApp = null;
     }
     if (_WindowParenter != null)
     {
         _WindowParenter.Dispose();
         _WindowParenter = null;
     }
     Win32API.CloseWindow(win.Handle);
     win = new HandleRef();
 }
 public void Dispose()
 {
     _isDisposed = true;
     try
     {
         if (_webBrowser != IntPtr.Zero)
         {
             Win32API.CloseWindow(_webBrowser);
         }
         _webBrowser = IntPtr.Zero;
     }
     catch (Exception ex)
     {
         Trace.WriteLine("WpfBrowser Dispose: " + ex.Message + "\r\n" + ex.StackTrace);
     }
 }
Esempio n. 4
0
        private void button7_Click(object sender, EventArgs e)
        {
            bool result = Win32API.CloseWindow((IntPtr)0x00010166);

            Console.WriteLine(result);
        }