FlatRedBall.Glue.Controls.TextInputWindow.OnShown C# (CSharp) Method

OnShown() protected method

protected OnShown ( EventArgs e ) : void
e System.EventArgs
return void
        protected override void OnShown(EventArgs e)
        {
            base.OnShown(e);
            Location = new Point(TextInputWindow.MousePosition.X - Width / 2, TextInputWindow.MousePosition.Y - Height / 2);

            this.EnsureOnScreen();

            var screen = Screen.FromControl(this);
            System.Drawing.Point newLocation = this.Location;

            if (this.Bounds.Top < 0)
                newLocation.Y = 0;

            this.Location = newLocation;




            textBox1.Focus();
        }
	}