static void Main() { // Create and attach a UI Dispatcher to the main Form // When the form exits, this scoping block will auto-dispose of the Dispatcher using (var disp = Dispatcher.AttachUIDispatcher()) { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); // Create an instance of TTAPI. frmOrderUpdate orderUpdate = new frmOrderUpdate(disp); Application.Run(orderUpdate); } }
static void Main() { // Create and attach a UI Dispatcher to the main Form // When the form exits, this scoping block will auto-dispose of the Dispatcher using (var disp = Dispatcher.AttachUIDispatcher()) { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); // Create an instance of TTAPI. frmOrderUpdate monitorOrders = new frmOrderUpdate(); TTAPI.UniversalLoginModeDelegate ulDelegate = new TTAPI.UniversalLoginModeDelegate(monitorOrders.initTTAPI); TTAPI.CreateUniversalLoginTTAPI(disp, ulDelegate); Application.Run(monitorOrders); } }