1

I want to add GlobalHook to my program so i added event :

private void Form1_Load(object sender, EventArgs e)
{
    HookManager.KeyDown += HookManager_KeyDown;
}

And The Void

private void HookManager_KeyDown(object sender, KeyEventArgs e)
{
    if (e.KeyCode == Keys.X)
    {
        MessageBox.Show("TEST");
    }
}

But when i start my code , error comes up with error :

An unhandled exception of type System.ComponentModel.Win32Exception occurred in Program.exe

Additional information: The specified module could not be found

What i have to do to fix this ? Why this error comes up ?

Thanks,

Soner Gönül
  • 97,193
  • 102
  • 206
  • 364
Al00X
  • 1,492
  • 1
  • 12
  • 17

1 Answers1

-1

Target .Net 2.0 on all the projects in your solution or at least those using the library and all will be fine.

Damien Doumer
  • 1,991
  • 1
  • 18
  • 33