Classic form start from the main function
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Form1()); } And here I launch a hook to track mouse movement. Because of this, it gives an error
public static void start() { _hookID = SetHook(_proc); Application.Run(); UnhookWindowsHookEx(_hookID); }