private void ThisAddIn_Startup(object sender, System.EventArgs e) { _dispatcher = Dispatcher.CurrentDispatcher; SetKeyboardHook(); SetMouseHook(); // Track the handle ID for the text editor (Microsoft Word) int handle = (int) GetActiveWindow(); currentSelection = Application.Selection; // Initialize forms and set Microsoft Word as the parent window autoCompleteForm = new AutoCompleteForm(); notificationForm = new Notification(); extendSuggestionForm = new ExtendSuggestionHint(); Application.WindowActivate += new Word.ApplicationEvents4_WindowActivateEventHandler(Application_WindowActivate); Application.WindowDeactivate += new Word.ApplicationEvents4_WindowDeactivateEventHandler(Application_WindowDeactivate); Application.WindowSize += new Microsoft.Office.Interop.Word.ApplicationEvents4_WindowSizeEventHandler(OnWindowSizeChange); //Convert Words DPI based Height and Width System.Drawing.Graphics g = notificationForm.CreateGraphics(); dpi = g.DpiX; updateApplicationSizeDetail(); logic = new Client(); bool serverStatus = initConfiguration(); extMode = new ExtensionMode(logic); if (serverStatus) { tourForm = new Tour(this.config, configurationFilePath); if (tourEnabled) { tourForm.ShowDialog(); } } else { // Setting this to true allow ACP to inform user that ACP is not been running isDisablePopUp = true; } // for user testing startTestTime = "START TIME," + DateTime.Now.ToString("HH:mm:ss") + "\r"; }