static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); var context = SpreadsheetGUIContext.GetContext(); SpreadsheetGUIContext.GetContext().RunNew(); Application.Run(context); }
/// <summary> /// Handles a request to open a new spreadsheet /// </summary> private void HandleNew() { Thread thread = new Thread(() => { var context = SpreadsheetGUIContext.GetContext(); SpreadsheetGUIContext.GetContext().RunNew(); Application.Run(context); }); thread.SetApartmentState(ApartmentState.STA); thread.Start(); }