Skip to content

Needs help on writting a keylogger

edward pie

Asked Sep 13, 2008, 3:37 AM EDT1 answer
Share
LinkedInX
I am writting a keylogger in c# but it is able to capture keystroked only when it's form is active.
When i hide the form,it works no more.I searched and was told to have a global hook on the keyboard but i don't know how to do it.
pls help me

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • Bechir Bejaoui
    +1
    try this couple lines of code instead of yours

    RegistryKey oRegistryKey = Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true); rkApp.SetValue("MyApp",Application.ExecutablePath.ToString());

    dont forget to add  System.Win32 namespace

    If it doesn't work then write me again and tell me exactly what happens
    +1