InvalidOperationException: 在创建窗口句柄之前,不能在控件上调用 Invoke 或 BeginInvoke。 StackTrace: 在 System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous) 在 System.Windows.Forms.Control.BeginInvoke(Delegate method, Object[] args) 在 __ScriptExecution.__5jpekyb0.WindowTabsContext.HookProc(IntPtr hWinEventHook, UInt32 eventType, IntPtr hwnd, Int32 idObject, Int32 idChild, UInt32 dwEventThread, UInt32 dwmsEventTime)