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

OnLoadInternal() private method

private OnLoadInternal ( EventArgs e ) : void
e System.EventArgs
return void
		private void OnLoadInternal (EventArgs e)
		{
			if (AutoScale) {
				ApplyAutoScaling ();
				AutoScale = false;
			}

			if (!IsDisposed) {
				OnSizeInitializedOrChanged ();
				
				// We do this here because when we load the MainForm,
				// it happens before the exception catcher in NativeWindow,
				// so the user can error in handling Load and we wouldn't catch it.
				try {
					OnLoad (e);
				}
				catch (Exception ex) {
					Application.OnThreadException (ex);
				}

				if (!IsDisposed)
					is_visible = true;
			}
			
			if (!IsMdiChild && !IsDisposed) {
				switch (StartPosition) {
					case FormStartPosition.CenterScreen:
						this.CenterToScreen ();
						break;
					case FormStartPosition.CenterParent:
						this.CenterToParent ();
						break;
					case FormStartPosition.Manual:
						Left = CreateParams.X;
						Top = CreateParams.Y;
						break;
				}
			}
			
			is_loaded = true;
		}
		#endregion
Form