NoStartupFormException Constructors

Definition

Initializes a new instance of the NoStartupFormException class.

Overloads

NoStartupFormException()

Initializes a new instance of the NoStartupFormException class.

NoStartupFormException(String)

Initializes a new instance of the NoStartupFormException class with a specified error message.

NoStartupFormException(SerializationInfo, StreamingContext)
Obsolete.

Initializes a new instance of the NoStartupFormException class with serialized data.

NoStartupFormException(String, Exception)

Initializes a new instance of the NoStartupFormException class with a specified error message and a reference to the inner exception that is the cause of this exception.

NoStartupFormException()

Initializes a new instance of the NoStartupFormException class.

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

Remarks

The Visual Basic Application Model requires that the application set the MainForm property before running the OnRun method. If the property is not set, the Visual Basic Application Model raises this exception. For more information, see Extending the Visual Basic Application Model.

The following table shows the initial property values for an instance of NoStartupFormException.

Property Value
InnerException A null reference (Nothing in Visual Basic).
Message The localized error-message string.

See also

Applies to

NoStartupFormException(String)

Initializes a new instance of the NoStartupFormException class with a specified error message.

public:
 NoStartupFormException(System::String ^ message);
public NoStartupFormException (string message);
new Microsoft.VisualBasic.ApplicationServices.NoStartupFormException : string -> Microsoft.VisualBasic.ApplicationServices.NoStartupFormException
Public Sub New (message As String)

Parameters

message
String

A message that describes the error.

Remarks

The content of the message parameter is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.

NoStartupFormException inherits from Exception. This constructor sets the properties of the Exception object as shown in the following table.

Property Value
InnerException A null reference (Nothing in Visual Basic)
Message The message string.

See also

Applies to

NoStartupFormException(SerializationInfo, StreamingContext)

Caution

Type or member obsolete.

Initializes a new instance of the NoStartupFormException class with serialized data.

protected:
 NoStartupFormException(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
protected NoStartupFormException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
[System.Obsolete("Type or member obsolete.", DiagnosticId="SYSLIB0051")]
protected NoStartupFormException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
new Microsoft.VisualBasic.ApplicationServices.NoStartupFormException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> Microsoft.VisualBasic.ApplicationServices.NoStartupFormException
[<System.Obsolete("Type or member obsolete.", DiagnosticId="SYSLIB0051")>]
new Microsoft.VisualBasic.ApplicationServices.NoStartupFormException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> Microsoft.VisualBasic.ApplicationServices.NoStartupFormException
Protected Sub New (info As SerializationInfo, context As StreamingContext)

Parameters

info
SerializationInfo

The SerializationInfo object that holds the serialized object data about the exception being thrown.

context
StreamingContext

The StreamingContext object that contains contextual information about the source or destination.

Attributes

Remarks

This constructor is called during deserialization to reconstitute the exception object transmitted over a stream.

See also

Applies to

NoStartupFormException(String, Exception)

Initializes a new instance of the NoStartupFormException class with a specified error message and a reference to the inner exception that is the cause of this exception.

public:
 NoStartupFormException(System::String ^ message, Exception ^ inner);
public NoStartupFormException (string message, Exception inner);
new Microsoft.VisualBasic.ApplicationServices.NoStartupFormException : string * Exception -> Microsoft.VisualBasic.ApplicationServices.NoStartupFormException
Public Sub New (message As String, inner As Exception)

Parameters

message
String

A String object describing the error.

inner
Exception

The Exception object that is the cause of the current exception. If the InnerException parameter is not a null reference (Nothing in Visual Basic), the current exception is raised in a catch block that handles the inner exception.

Remarks

The content of the message parameter is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.

An exception that is thrown as a direct result of a previous exception should include a reference to the previous exception in the InnerException property. The InnerException property returns the same value that is passed into the constructor, or a null reference if the InnerException property does not supply the inner exception value to the constructor.

The following table shows the initial property values for an instance of ApplicationException.

Property Value
InnerException The inner reference.
Message The message string.

See also

Applies to