开发者

Track key strokes in Word Document hosted in Browser Control in a WPF app

I am using word application host in browser. According to my application I want to use the selected text from the hosted document using any key press like if I press s then the selected text in the document will be return.

The problem is when I press any key in开发者_如何转开发 document it replace the word i have selected in the document and set the value which key I am pressing.

For example "Hi how are you" is selected in document and when I press s key it becomes "s" instead of returning "Hi how are you".

How can I track which key is pressed and get the selected text from the document.


Ok no body is giving the answer i am gone do this. I have done with the Key tracking on the windows. genraly its not posible to capture into office app that which key has been pressed. so i found the answer is to use keyboard hook into your application which track all key input send to windows by keyboard. the code sample is below

This http://www.codeproject.com/KB/cs/globalhook.aspx sample help me to find the key stork which i passed to application.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜