473,327 Members | 1,930 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

The designer must create an instance (but bae class is not abstract)

I have the following code:

Public Class frmMyForm
Inherits System.Windows.Forms.Form

Friend cnMyConnection As System.Data.OleDb.OleDbConnection

Public Sub ShowMe()
Me.Show()
If Me.WindowState = FormWindowState.Minimized Then
Me.WindowState = FormWindowState.Normal
End Sub

Public Overridable Sub UpdateDataSet()
Throw New NotImplementedException
End Sub

Private Sub frmMyForm_Closing(ByVal sender As Object, ByVal e As
System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
Dim blnQuestion As Boolean
'...
If blnQuestion Then
UpdateDataSet()
End If
'...
End Sub
'...
End Class

Public Class frmCompany
Inherits frmMyForm

Public Overrides Sub UpdateDataSet()
'...
End Sub
'...
End Class

I'm not using any MustInherit or MustOverride in my base class
frmMyForm.

I get the following warning in the VS designer:
The designer must create an instance of type 'MyApp.frmMyForm' but it
cannot because the type is declared as abstract.
The program runs just fine.

I Googled a bit on the subject, and found related topic, but only if my
base class frmMyForm would have been abstract, and that is not the case
AFAICT.

What am I doing wrong here?

--
Amedee

Mar 13 '06 #1
0 1119

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: MKoleoso | last post by:
Problem: C#- Unable to create instance of a class implementing from an interface I have: namespace someNamespace { public __gc class SomeClass1 { }
3
by: thechaosengine | last post by:
Hi all, I wanted to put some common security functions into a class that inherits from the Page class and then use the new class as the basis for all my pages. Unfortunately, if I try and...
2
by: Joe Vrba | last post by:
I'm building a family of components derived from UserControl. There's an abstract base class to ensure basic functionality and then numerous other controls derived from that. The problem is...
1
by: S Guiboud | last post by:
I want to subclass the System.Web.UI.UserControl to make a common control for my site. Then, when I create a new UserControl from the Visual Studio I changed the base class...
4
by: Slimeman | last post by:
When I create a BasePage class in either the same or separate assembly, create a Web Form that inherits from BasePage, and then attempt to view my Web Form in the visual designer, I get the...
3
by: VMI | last post by:
I posted this in the MS aspnet NG and nobody replied. Hopefully, I'll be luckier here... I have VS .net 2003 v1.1 and I'm trying to view some web pages in the designer form. When I try to do this,...
2
by: marfi95 | last post by:
I am trying to setup a usercontrol as a base class, so that I can derive my usercontrols from it. the base is pretty simple: Imports System.Xml Public Class usrBase Inherits...
2
by: Joh Smith | last post by:
I have a form called Parent that I mark as abstract (MustInherit). Then I add another form called Child that inherits Parent and implements all Parent abstract methods. It compiles Ok, but when i...
4
by: Phil | last post by:
VS 2008 I have a windows form that was created in the normal way using the form designer. I do not wish to use this form directly though, I want to use it as a basis for some other forms. I have...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.