473,387 Members | 1,683 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Capturing windows events (hooks)..

Hello folks.
I want my app to process windows events first, so that it has some kind of a
"global hook". The scenario is - i want my app to process all messages for
"F3" key (or any other key for that matter) first before any other window
does it. This has to happen whether my app is minimized, inactive,not in
focus, in systray etc..
I tried playing around with WndProc and overriding it but it doesnt capture
all key events (WM_KEYDOWN) events. Im sure im missing the point somewhere.
Anyone care to point me in the right direction?

Much appreciated.
Mohit
Nov 15 '05 #1
1 3350
What you're looking for is the Win32 Api, RegisterHotKey. Do a native call
and register your Form's window handle.

VJ

"Mohit Sachdeva" <ms*******@nospam-covansys.com> wrote in message
news:On**************@TK2MSFTNGP11.phx.gbl...
Hello folks.
I want my app to process windows events first, so that it has some kind of a "global hook". The scenario is - i want my app to process all messages for
"F3" key (or any other key for that matter) first before any other window
does it. This has to happen whether my app is minimized, inactive,not in
focus, in systray etc..
I tried playing around with WndProc and overriding it but it doesnt capture all key events (WM_KEYDOWN) events. Im sure im missing the point somewhere. Anyone care to point me in the right direction?

Much appreciated.
Mohit

Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Evgeny Zoldin | last post by:
Hi, ALL Does anybody know how to capture mouse wheel events in C# occured on the control that natively does not suppot them (e.g. MS Flex Grid)? I have code hooks windows messages in VB6. I've...
3
by: lemony | last post by:
I have written a small .net application to captutre the output from calls to OutputDebugString. However it does not always work, and in general does not seem to capture the output when it is...
9
by: Will Pittenger | last post by:
If I were writing a C++ program, I would write a mouse hook. Does C# and ..NET 1.1 have anything equivalent. If not, I suppose I will need to use the Win32 API. ---------- Will Pittenger...
3
by: Cooly Martziano | last post by:
Hi, Is there any way in C# that enables me to capture the right click event (on the desktop for example) and add some code of my own on each of these events ? Thanks, Cooly M.
10
by: CMG | last post by:
There is a program called ShortKey, the basic function of this program is the following: Say you define a shortkey called "MSDN". The program will then, everytime you type MSDN replace MSDN with...
7
by: Dracolytch | last post by:
Hey all, I'm looking for a way to view all of the windows messages, like Spy ++ does. It's fairly trivial to do it for the current application, but how can I take that knowledge to the bigger...
2
by: SLE | last post by:
Hi there, I am writing a service which monitors processes on the local machine. Currently I have implemented a System.Management.ManagementEventWatcher which raises events for processes being...
5
by: Nick | last post by:
Hey guys, I have 2 events on a windows forms datagrid, the mouse move as well as the double click events. What's happening is that when I double click on a row in the grid, the mouse move event...
3
by: wbyeats | last post by:
Hi, I would like to enable my VC++ application to capture general mouse and keyboard events (click, double-click, key press) that occur outside of my application's frame (eg. clicking inside the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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,...

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.