Advertisement
Guest User

Untitled

a guest
May 28th, 2017
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.71 KB | None | 0 0
  1.         private void button2_Click(object sender, EventArgs e)
  2.         {
  3.             // retrieve Notepad main window handle
  4.             IntPtr hWnd = FindWindow("TFconsVis", "Consultar Visitas...X");
  5. //            IntPtr hWnd = FindWindow("TForm1", "Form1555...");
  6.             if (!hWnd.Equals(IntPtr.Zero))
  7.             {
  8.                 // SW_SHOWMAXIMIZED to maximize the window
  9.                 // SW_SHOWMINIMIZED to minimize the window
  10.                 // SW_SHOWNORMAL to make the window be normal size
  11.                 ShowWindow(hWnd, SW_RESTORE);
  12.                 SetForegroundWindow(hWnd);
  13.                 //SendKeys.SendWait("{ENTER}");
  14.                 SendKeys.SendWait("{F10}");
  15.             }
  16.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement