Ejemplo n.º 1
0
 protected override void OnHandleDestroyed(EventArgs e)
 {
     base.OnHandleDestroyed(e);
     if (_currentForm == this)
     {
         _currentForm = null;
     }
 }
Ejemplo n.º 2
0
        protected override void OnHandleCreated(EventArgs e)
        {
            base.OnHandleCreated(e);

            if (_currentForm != null && _currentForm.IsHandleCreated)
            {
                _currentForm.Close();
            }
            _currentForm = this;
        }