468,505 Members | 1,714 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,505 developers. It's quick & easy.

How to get the selected text when pressing a hotkey

I want to write a simple utility, so that if I select a text, and press a hot
key
say (CTRL+ALT+G), then I should be able to open a google search page with
the selected text. Could someone tell me how to get the selected text when
this hotkey is pressed.
Jul 21 '05 #1
1 1613
On Fri, 18 Mar 2005 04:49:05 -0800, Nitesh Jain wrote:
I want to write a simple utility, so that if I select a text, and press a hot
key
say (CTRL+ALT+G), then I should be able to open a google search page with
the selected text. Could someone tell me how to get the selected text when
this hotkey is pressed.


Well, I did something like that several years ago using VC++. What we did
was the following: When the user pressed the hotkey, we sent the keys
Ctrl+C to the currently active application. That copied the selected text
to the clipboard.
We then accessed the clipboard from our application to get the copied text.
I'm sure something like that is possible with .NET too.

--
Claudio Grazioli
http://www.grazioli.ch
Jul 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Marcus Peters | last post: by
3 posts views Thread by Rsrany | last post: by
reply views Thread by NvrBst | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by fmendoza | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.