المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Use sendkeys() for google chrome



C# Programming
12-02-2009, 09:40 AM
Hello,
i want to open google chrome and then i want to pass keyword say "Codeproject.com".
I have used process class to open chrome, but how do i use sendkeys() to it.

//google search
Process newprocess = new Process();
newprocess.StartInfo.FileName = "chrome.exe";
newprocess.StartInfo.Arguments = "www.google.com";
newprocess.Start();
SetForegroundWindow(newprocess.MainWindowHandle);
SendKeys.SendWait("CodeProject.com");

Please help me its urgent.
Thank you in advance.