473,796 Members | 2,903 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1912
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
5656
by: Shaiboy_UK | last post by:
Hi All, Hope someone can help here!! I'm putting a standard mail page together, that will allow my users to sent templete emails out to people. The files are stored in text files. I have come up with a script to produce the names into a Select list, but know i'm wanting them to be read into a textarea box, to allow me to submit them into from the form into the sendmail.asp page! but the only way i can pass them out, is into a...
2
2622
by: David | last post by:
Hi, I have an order form which has a field 'ProductID'. This form has a button on each record to open a new form linked by ProductID. This new form is a continuous form and obviously, only displays the records associated with that ProductID. Basically this is part of a Product Packing Pick System. From my products table, each product has a set default amount of items which
4
18710
by: Marcus Peters | last post by:
Hi folks, I need to copy the selected text in any other application to the clipborad. I played around with several ways which did not work: Win API: Send a Message with WM_COPY --> Worked only with TextBoxes, ComboBoxes and so on, There are several posts for doing so. But way to copy from for example from IE.
1
227
by: Nitesh Jain | last post by:
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.
3
2607
by: Rsrany | last post by:
I've been working on a few gtk applications and need to tie a hot key catcher into a thread. I am currently finding threaded user32.GetMessageA do not work. I have included two programs: 1) a non-threaded version that works 2) a threaded version that doesnt work. Any constructive suggestions would be helpful
0
1181
by: NvrBst | last post by:
I want to be able to tell when the mouse left clicks even when my application doesn't have focus. I tried adding this to my form ------------------------------------------ protected override void WndProc(ref Message m) { if(m.Msg == WM_NCLBUTTONDOWN) { System.Windows.Forms.MessageBox.Show("Mouse Clicked"); } base.WndProc(ref m);
0
1428
by: jayquest | last post by:
Any ideas? I want to create a global windows hotkey that performs an action on the selected text in any windows program (that is not read only of coarse). For example: Remove all spaces from this text string, or carriage return after every period etc. Any help would be greatly appreciated. Thanks jayquest
1
2791
by: macrow | last post by:
Hi All, I was wondering if it was possible in vb.net to select text from an external application such as IE, then press a hotkey which would copy the contents to clipboard? I have no problems with setting up system wide hotkeys and with copying selected text if it was not an external application but could not find any info on how I might do the above.
8
6231
by: ALTAFAD | last post by:
How to copy selected (s) textfield, which those selected through checkbox I like to copy in clipboard. Access textfield data when front of the textfield checkbox is checked if not checked it should not copy in clipboard. If text field has data like that altaf/ahmed mr one field checked goodguydude@thisandthatandtheother.com one field checked...
0
9679
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9527
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10453
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10223
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10003
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7546
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5573
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3730
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2924
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.