WindowsFormsApplicationBase.OnCreateMainForm Method


When overridden in a derived class, allows a designer to emit code that configures the splash screen and main form.

 virtual void OnCreateMainForm();
protected virtual void OnCreateMainForm ();
abstract member OnCreateMainForm : unit -> unit
override this.OnCreateMainForm : unit -> unit
Protected Overridable Sub OnCreateMainForm ()


By default, this method does nothing. However, when you select a main form for your application in the Visual Basic Project Designer, the designer overrides this method with a method that sets the MainForm property to a new instance of the main form.

This method is called by the OnRun method.

Applies to

See also