Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void button2_Click(object sender, EventArgs e)
- {
- // retrieve Notepad main window handle
- IntPtr hWnd = FindWindow("TFconsVis", "Consultar Visitas...X");
- // IntPtr hWnd = FindWindow("TForm1", "Form1555...");
- if (!hWnd.Equals(IntPtr.Zero))
- {
- // SW_SHOWMAXIMIZED to maximize the window
- // SW_SHOWMINIMIZED to minimize the window
- // SW_SHOWNORMAL to make the window be normal size
- ShowWindow(hWnd, SW_RESTORE);
- SetForegroundWindow(hWnd);
- //SendKeys.SendWait("{ENTER}");
- SendKeys.SendWait("{F10}");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement