473,387 Members | 3,750 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.

Key handling outside application?

Hello, I am developing an application, mainly for personal use, that
runs in the system tray, organizes data (calendar, etc.), and has
several useful widgets included (little scratch pads and stuff). I
would like to add a feature where I, as the end user, can set custom
hotkeys to run different applications, etc.

The only problem is, using the normal key event handlers (to my
knowledge) can only be detected when that control is active. So is
there any way to read key event handlers outside the application (or
has is this not possible for security measures)?

Thanks in advance,
-aeron

Jan 11 '07 #1
4 1333
You are pretty much looking for a keylogger, although (I hope) you are
using it for honest means. I know a lot of free keylogging source code
exists for VB6, although I don't know of any of .Net but I also haven't
looked for any. I would recommend doing some google searches for
"keylogger source code" or something similar. If you don't find any
thing let us know - I have some old keylogger-type code laying around
somewhere that I could dig up if need be.

Thanks,

Seth Rowe
aeron...@gmail.com wrote:
Hello, I am developing an application, mainly for personal use, that
runs in the system tray, organizes data (calendar, etc.), and has
several useful widgets included (little scratch pads and stuff). I
would like to add a feature where I, as the end user, can set custom
hotkeys to run different applications, etc.

The only problem is, using the normal key event handlers (to my
knowledge) can only be detected when that control is active. So is
there any way to read key event handlers outside the application (or
has is this not possible for security measures)?

Thanks in advance,
-aeron
Jan 11 '07 #2
Ah. That's what I was afraid of... well I looked around and found some
code snippets that (I think) can do what I want, so I'll mess with that
for now. It shouldn't be too hard, I just need to check if a certain
combination was last pressed and it should activate the corresponding
action. I hope it's as simple as it sounds...

Thanks for your reply!

On Jan 10, 6:07 pm, "rowe_newsgroups" <rowe_em...@yahoo.comwrote:
You are pretty much looking for a keylogger, although (I hope) you are
using it for honest means. I know a lot of free keylogging source code
exists for VB6, although I don't know of any of .Net but I also haven't
looked for any. I would recommend doing some google searches for
"keylogger source code" or something similar. If you don't find any
thing let us know - I have some old keylogger-type code laying around
somewhere that I could dig up if need be.

Thanks,

Seth Rowe

aeron...@gmail.com wrote:
Hello, I am developing an application, mainly for personal use, that
runs in the system tray, organizes data (calendar, etc.), and has
several useful widgets included (little scratch pads and stuff). I
would like to add a feature where I, as the end user, can set custom
hotkeys to run different applications, etc.
The only problem is, using the normal key event handlers (to my
knowledge) can only be detected when that control is active. So is
there any way to read key event handlers outside the application (or
has is this not possible for security measures)?
Thanks in advance,
-aeron
Jan 11 '07 #3
Here are a few keylogger examples for VB.NET:

http://www.planet-source-code.com/vb...4583&lngWId=10

http://www.planet-source-code.com/vb...1924&lngWId=10

One more thing Aeron: Spoof your e-mail address unless you like being
spammed

I hope this helps,

Newbie Coder
Jan 11 '07 #4
What you are looking for is Windows Hooks. You need to set a keyboard hook
using the Windows API that will intercept all the key presses. Google it and
you will find some interesting articles. Just make sure you release the hook
afterwards.

Good luck!

<ae******@gmail.comwrote in message
news:11*********************@77g2000hsv.googlegrou ps.com...
Hello, I am developing an application, mainly for personal use, that
runs in the system tray, organizes data (calendar, etc.), and has
several useful widgets included (little scratch pads and stuff). I
would like to add a feature where I, as the end user, can set custom
hotkeys to run different applications, etc.

The only problem is, using the normal key event handlers (to my
knowledge) can only be detected when that control is active. So is
there any way to read key event handlers outside the application (or
has is this not possible for security measures)?

Thanks in advance,
-aeron

Jan 12 '07 #5

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

Similar topics

3
by: Ryan N. | last post by:
Hello, I saw a brief blurb on this somewhere and am unable to recall where... In the context of Security, what are some best practices for handling -storing, locating, retrieving- database OLEDB...
7
by: Noor | last post by:
please tell the technique of centralize exception handling without try catch blocks in c#.
28
by: Frank Puck | last post by:
Meanwhile there are at least 8 years that compilers exist, which provide a working implementation of C++ Exception Handling. Has anything changed meanwhile? From my point of view nothing has...
3
by: mailar | last post by:
Hi, Can someone tell me how to perform exception handling in DB2 UDFs(not procedures). ALso, while usin the SIGNAL statement in one of my UDFs I encountered an error message which is as below ...
9
by: David B | last post by:
Why is it so difficult to report bugs to Microsoft? I have a documented bug and an small test example. I don't really see why I should have to pay to tell them about it... Anyway, the...
1
by: Noor | last post by:
Hi all, I am trying to catch all types of exceptions from a app regardless of whether it is in debugger mode( VS development environment) or run the.exe file outside the IDE. My App...
11
by: chopsnsauce | last post by:
Here's the example: Dim frm As New FORM1 Try frm.show Catch ex As Exception msgbox ex.message
6
by: Robin Riley | last post by:
Hi, I have a .NET solution that contains a dll project and a tester application project which, of course, invokes the dll. The dll project has exception handling in it. What's happening is that...
10
by: a | last post by:
Hi For VB .NET, which class is responsible for the key strike event? Thanks
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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,...
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...

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.