ApplicationContext ApplicationContext ApplicationContext ApplicationContext Constructors

定义

重载

ApplicationContext() ApplicationContext() ApplicationContext()

不带上下文初始化 ApplicationContext 类的新实例。Initializes a new instance of the ApplicationContext class with no context.

ApplicationContext(Form) ApplicationContext(Form) ApplicationContext(Form) ApplicationContext(Form)

使用指定的 ApplicationContext 初始化 Form 类的新实例。Initializes a new instance of the ApplicationContext class with the specified Form.

ApplicationContext() ApplicationContext() ApplicationContext()

不带上下文初始化 ApplicationContext 类的新实例。Initializes a new instance of the ApplicationContext class with no context.

public:
 ApplicationContext();
public ApplicationContext ();
Public Sub New ()

ApplicationContext(Form) ApplicationContext(Form) ApplicationContext(Form) ApplicationContext(Form)

使用指定的 ApplicationContext 初始化 Form 类的新实例。Initializes a new instance of the ApplicationContext class with the specified Form.

public:
 ApplicationContext(System::Windows::Forms::Form ^ mainForm);
public ApplicationContext (System.Windows.Forms.Form mainForm);
new System.Windows.Forms.ApplicationContext : System.Windows.Forms.Form -> System.Windows.Forms.ApplicationContext
Public Sub New (mainForm As Form)

参数

mainForm
Form Form Form Form

要用于上下文的应用程序的主 FormThe main Form of the application to use for context.

注解

如果OnMainFormClosed未重写,则关闭时MainForm线程的消息循环将终止。If OnMainFormClosed is not overridden, the message loop of the thread terminates when MainForm is closed.

适用于