Ejemplo n.º 1
0
        internal void SetActiveForm(Form f)
        {
            if (ActiveForm != f)
            {
                if (ActiveForm != null)
                {
                    ActiveForm.OnDeactivate(EventArgs.Empty);
                }

                ActiveForm = f;

                Terminal.ResetBuffer();

                f.OnActivated(EventArgs.Empty);
                f.Invalidate();
                if (f.FocusedControl == null)
                {
                    if (f.Controls.TabIndexList.Count > 0)
                    {
                        f.FocusedControl = f.Controls.TabIndexList.First.Value;
                    }
                }
            }
        }