public MainForm() { this.InitializeComponent(); this.overlay = CreateOverlayForm(); MouseHook.Instance.Hook(); MouseHook.Instance.MouseMove += this.MouseHookMouseMove; MouseHook.Instance.MouseDown += this.InstanceOnMouseDown; }
private static OverlayForm CreateOverlayForm() { var desktop = GetWholeDesktopDimensions(); var res = new OverlayForm { Left = desktop.Left, Top = desktop.Top, Width = desktop.Width, Height = desktop.Height }; return(res); }