System.Windows.Forms.Form.SelectActiveControl C# (CSharp) Method

SelectActiveControl() private method

private SelectActiveControl ( ) : void
return void
		internal void SelectActiveControl ()
		{
			if (this.IsMdiContainer) {
				mdi_container.SendFocusToActiveChild ();
				return;
			}
				
			if (this.ActiveControl == null) {
				bool visible;

				// This visible hack is to work around CanSelect always being false if one of the parents
				// is not visible; and we by default create Form invisible...
				visible = this.is_visible;
				this.is_visible = true;

				if (SelectNextControl (this, true, true, true, true) == false) {
					Select (this);
				}

				this.is_visible = visible;
			} else {
				Select (ActiveControl);
			}
		}
		
Form