Abstract Form Class
From: Siobhan (anonymous_at_discussions.microsoft.com)
Date: 03/19/04
- Next message: DevComponents: "[ANN] DotNetBar Suite 3.6 Released"
- Previous message: Pascal Cloup: "Re: Tools bar icon"
- Next in thread: Herfried K. Wagner [MVP]: "Re: Abstract Form Class"
- Reply: Herfried K. Wagner [MVP]: "Re: Abstract Form Class"
- Reply: Stoitcho Goutsev \(100\) [C# MVP]: "Re: Abstract Form Class"
- Reply: Siobhan: "RE: Abstract Form Class"
- Reply: Andrew Bingham: "Re: Abstract Form Class"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 19 Mar 2004 06:56:08 -0800
Hi
I wonder can anyone answer - can I create a form which is an abstract class i.e. has the MustInherits keyword in the class definition
When I do this I get the error message:
'New' cannot be used on a class that is declared 'MustInherit'.
This happens before I have put any other code on the system, all I have done is entered the MustInherits keyword - this is all the code in the form:
Public MustInherit Class Form1
Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
components = New System.ComponentModel.Container
Me.Text = "Form1"
End Sub
#End Region
End Class
I have another form which has more properties and methods etc and I get a similary message:
'New' cannot be used on class 'FormTemplates.frmStandardDataEntry' because it contains a 'MustOverride' member that has not been overridden.
Any help is greatly appreciated!
Thanks
Siobhan
- Next message: DevComponents: "[ANN] DotNetBar Suite 3.6 Released"
- Previous message: Pascal Cloup: "Re: Tools bar icon"
- Next in thread: Herfried K. Wagner [MVP]: "Re: Abstract Form Class"
- Reply: Herfried K. Wagner [MVP]: "Re: Abstract Form Class"
- Reply: Stoitcho Goutsev \(100\) [C# MVP]: "Re: Abstract Form Class"
- Reply: Siobhan: "RE: Abstract Form Class"
- Reply: Andrew Bingham: "Re: Abstract Form Class"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|