Connecting Tech Pros Worldwide Forums | Help | Site Map

Catching events outside the application...

Billy Porter
Guest
 
Posts: n/a
#1: Nov 17 '05
How would I go about catching events outside my application?

Example: Babylon Pro is a program that runs silently (with a hidden GUI) in
the system tray. Whenever you use the keyboard/mouse combination CTRL+Right
mouse click (in ANY program), the GUI is shown containing the dictionary
lookup of the marked word.

If I were to write such an application, how could I catch that particular
keyboard combination outside of my application.

Thanks!



Chris R. Timmons
Guest
 
Posts: n/a
#2: Nov 17 '05

re: Catching events outside the application...


"Billy Porter" <billy@xymox.com> wrote in
news:uJ82gsGzFHA.3720@TK2MSFTNGP14.phx.gbl:
[color=blue]
> How would I go about catching events outside my application?
>
> Example: Babylon Pro is a program that runs silently (with a
> hidden GUI) in the system tray. Whenever you use the
> keyboard/mouse combination CTRL+Right mouse click (in ANY
> program), the GUI is shown containing the dictionary lookup of
> the marked word.
>
> If I were to write such an application, how could I catch that
> particular keyboard combination outside of my application.[/color]

http://www.dotnet2themax.com/ShowCon...b-df9a75f30944

--
Hope this helps.

Chris.
-------------
C.R. Timmons Consulting, Inc.
http://www.crtimmonsinc.com/
Billy Porter
Guest
 
Posts: n/a
#3: Nov 17 '05

re: Catching events outside the application...


Thank you so much, thats just what I was looking for!

Just one more thing: Is there any way to get the word that was clicked on
(just like Babylon)? See my former post for more information.

Thanks again!

"Chris R. Timmons" <crtimmons@X_NOSPAM_Xcrtimmonsinc.com> wrote in message
news:Xns96E9D90843211crtimmonscrtimmonsin@207.46.2 48.16...[color=blue]
> "Billy Porter" <billy@xymox.com> wrote in
> news:uJ82gsGzFHA.3720@TK2MSFTNGP14.phx.gbl:
>[color=green]
>> How would I go about catching events outside my application?
>>
>> Example: Babylon Pro is a program that runs silently (with a
>> hidden GUI) in the system tray. Whenever you use the
>> keyboard/mouse combination CTRL+Right mouse click (in ANY
>> program), the GUI is shown containing the dictionary lookup of
>> the marked word.
>>
>> If I were to write such an application, how could I catch that
>> particular keyboard combination outside of my application.[/color]
>
> http://www.dotnet2themax.com/ShowCon...b-df9a75f30944
>
> --
> Hope this helps.
>
> Chris.
> -------------
> C.R. Timmons Consulting, Inc.
> http://www.crtimmonsinc.com/[/color]


Chris R. Timmons
Guest
 
Posts: n/a
#4: Nov 17 '05

re: Catching events outside the application...


"Billy Porter" <billy@xymox.com> wrote in
news:u5QCtyOzFHA.3408@TK2MSFTNGP09.phx.gbl:
[color=blue]
> Thank you so much, thats just what I was looking for!
>
> Just one more thing: Is there any way to get the word that was
> clicked on (just like Babylon)? See my former post for more
> information.[/color]

Billy,

I'm not sure how that's done. I think you would need to get the
current mouse position (System.Windows.Forms.Cursor.Postion), and
then use the Windows API to get the handle of the window at that
position. Using that handle, check if the window is some kind of
text box. If it is, ideally the textbox would have some kind of
method you could query to have it tell you what word (if any) the
mouse cursor is hovering over.

I don't know exactly how Babylon is getting the word under the
cursor, but it is probably a much more complicated process than
what I just described. Here's an opinion from Peter Below, a
highly respected Delphi and Windows API expert, on this very topic:

http://groups.google.com/group/borla...343dabcaf8376c

or

http://tinyurl.com/8fvnh


--
Hope this helps.

Chris.
-------------
C.R. Timmons Consulting, Inc.
http://www.crtimmonsinc.com/
Closed Thread


Similar C# / C Sharp bytes