Solved

Hooking the keyboard

Posted on 2002-03-21
3
223 Views
Last Modified: 2010-04-05
Hi I want to make s small application that hooks the keyboard and logs all key pressings.

Some suggested GetAsyncKeyState but how can I trap ALL key pressings, what messages to I need to process? or how does it work?

Second I want to silently detect if a user is connected to the Internet how do I do that?

Some code examples would be much appreciated!

Thanks!
0
Comment
Question by:kbb2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 22

Accepted Solution

by:
Mohammed Nasman earned 200 total points
ID: 6886520
look at these articles

An introduction to hook procedures
http://delphi.about.com/library/bluc/text/uc063001a.htm
http://delphifaq.com/fq/q2108.shtml

and for the second question

uses
  WinInet;

function IsConnected: Boolean;
begin
  Result := (InternetGetConnectedState(nil, 0))
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
  if IsConnected then
    ShowMessage('you are online ')
  else
    ShowMessage('you are offline')
end;

0
 
LVL 9

Expert Comment

by:ginsonic
ID: 6887870
Go to www.delphi300.com and search for 'hook' .
Very good articles about . I use it and work perfect in all versions of Windows.

Nick

P.S. You must register to read the article but is freeware ( with the freeware registration you can read 50 old articles and daily just the new added ) .
0
 

Author Comment

by:kbb2
ID: 6888035
Thanks! Just what I needed!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question