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); } 
  • And what's stopping you from bringing everything into the Main method? - Kir_Antipov 7:49 pm

0