Exemplo n.º 1
0
        private void ThisAddIn_Startup(object sender, System.EventArgs e)
        {
            Timer timer = new Timer(2000);

            timer.Elapsed += (s, t) =>
            {
                var scrnUpdating = Application.ScreenUpdating;
                Application.ScreenUpdating = false;
                MainTimer.onElapsed(Application, t);
                if (scrnUpdating)
                {
                    Application.ScreenUpdating = true;
                }
            };
            timer.Start();
        }