[Mono-bugs] [Bug 365653] New: WindowsFormsApplicationBase. OnCreateMainForm should not throw exception

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Feb 28 11:46:00 EST 2008


           Summary: WindowsFormsApplicationBase.OnCreateMainForm should not
                    throw exception
           Product: Mono: Class Libraries
           Version: 1.9.0
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Minor
          Priority: P5 - None
         Component: VB Runtime
        AssignedTo: rkvinge at novell.com
        ReportedBy: sbrooks at quantussoftware.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---

When deriving a new application class from
Microsoft.VisualBasic.ApplicationServices.WindowsFormApplicationBase, the
following code works on Microsoft .NET:

Public Class MyApplication

    Protected Overrides Sub OnCreateMainForm()
        MainForm = New Form1()
    End Sub
End Class

However, on Mono, MyBase.OnCreateMainForm() throws a NotImplementedException.

Basically, it looks like on Microsoft's .NET
WindowsFormApplicationBase.OnCreateMainForm() does nothing (i.e. does not set
the main form and does not throw an exception), but
WindowsFormApplicationBase.Run() will throw an exception, after calling
OnCreateMainForm(), if MainForm is Nothing.

Obviously, this can be worked around by removing the unnecessary call to

Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

More information about the mono-bugs mailing list