Author | Post | |
beetleflux |
I have been learning c# for three weeks now. And I decided to try to make a keylogger. First off, I have some questions: 1:Can i log keyboard events without the program is the 'active' window(because I want to hide it) ? 2:How can I make it disappear from the toolbar(or whatever. i'm norwegian) ? Here's what I have done so far: using System; using System.Windows.Forms; using System.IO; public class Keydemo:Form { string log; public Keydemo() { this.KeyUp += new KeyEventHandler(OnKeyPress); this.Text="My first keylogger"; } public void OnKeyPress(object sender, KeyEventArgs e) { log=e.KeyCode.ToString(); StreamWriter strm; strm=new StreamWriter("C:\\windows\\MyNewFile.txt", true); strm.Write(log); strm.Close(); } public static void Main() { Application.Run(new Keydemo()); } } But now the program is visible and it has to be the 'active' window. I want to hide it, and I want to log keyboard events while it is invisible. |
|
28.04.2005 17:29:38 |
|
|
Starbob |
what you are looking for is called "hooking" try google on that |
|
28.04.2005 19:19:23 |
|