Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [DllImport("user32.dll")]
- static extern bool SetForegroundWindow(IntPtr hWnd);
- static void Main(string[] args)
- {
- #region Copy From Web
- Process pc = Process.Start("iexplore.exe", "http://stackoverflow.com/questions/11512373/findwindow-and-setforegroundwindow-alternatives"); pc.WaitForInputIdle();
- // Here i send the keys CTRL + A to select all and CTRL + C to copy on the webbrowser
- SendKeys.SendWait("^a^c");
- #endregion
- #region Past In Notpade
- Process n = Process.Start("notepad.exe");enter code here
- n.WaitForInputIdle();
- // Here i send the keys CTRL + V to paste on the notpade
- SendKeys.SendWait("^V");
- #endregion
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement