2
我試試這個教程的Silverlight 4 - 文本發送到記事本
http://elegantcode.com/2010/02/20/silverlight-4-com-interop-and-the-cool-stuff-you-can-do-with-it/
我需要打開記事本,併發送文本。我用這個代碼:
using (dynamic shell = AutomationFactory.CreateObject("WScript.Shell"))
{
shell.Run(@"C:\windows\notepad.exe"); //you can open anything
shell.SendKeys(txtTextToSend.Text);
}
當我開始aplication記事本已經出現,但在它裏面沒有文字。
我錯了什麼。我的系統是W7 64bit。 謝謝
偉大的工作,謝謝你,你救了我的一天。 – Marcus082 2011-02-14 17:54:38