开发者

Can use clipboard to add characters to Note Pad immediately after keystroke?

I am coding a keyboard software to di开发者_运维百科splay vietnamese for text editor such as Words or Note Pad, I wonder can I use clipboard to display clipboard contents immediately to active windows such as Word Pad


I think you are asking if you can use the clipboard to push data into the active window of an app such as Notepad. You can do this, in conjunction with sending keystroke messages. I mean, it's possible. It will probably work if no other applications are running on the system. i.e. if the user has your app running, notepad, and nothing else. i.e. a laboratory situation. In the real world, this breaks down and becomes a terrible idea. You are going to cause lots of conflicts with any other application that monitors the clipboard. Keep in mind that only one app can have the clipboard open at once. So as you shove data onto it, and then tell Notepad to paste, you've got to not only allow time for Notepad to do the pasting, but you also have to account for any other app that's signed up to receive clipboard notification. (such as my own ClipMate, or other clipboard-aware apps such as Microsoft Word, Explorer, etc..)

The clipboard is provided for the benefit and convenience of the user, not the programmer.

Summary: yes it's possible, but no, you should not do this.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜