Hi, all.
I'm having a problem which vb developers had for certain al least
once.
I have my base form, declared as musthinherit;
Public MustInherit Class frmsdvPrincipal
....
and my child form, declared as inherited;
Public Class frmsdvEtiquetas
Inherits SDV.UL.Principal.frmsdvPrincipal
....
In run-time, frmsdvEtiquetas runs perfect, but in design time, this
error occurs;
"The designer must create an instance of type
'SDV.UL.Principal.frmsdvPrincipal' but it cannot because the type is
declared as abstract"
I've tryed several tips like deleting the reference and adding it
again and excluding the child form and including it again, but nothing
works....
Can someone help me? What am i doing wrong?
URGENT!!!
Thanks in advance! 9 2340
I think this is a designer issue. Don't make the base class abstract and it
should go away.
"Pedro" <pn**@portugalmail.pt> wrote in message
news:9f**************************@posting.google.c om... Hi, all.
I'm having a problem which vb developers had for certain al least once.
I have my base form, declared as musthinherit;
Public MustInherit Class frmsdvPrincipal
...
and my child form, declared as inherited;
Public Class frmsdvEtiquetas Inherits SDV.UL.Principal.frmsdvPrincipal
...
In run-time, frmsdvEtiquetas runs perfect, but in design time, this error occurs;
"The designer must create an instance of type 'SDV.UL.Principal.frmsdvPrincipal' but it cannot because the type is declared as abstract"
I've tryed several tips like deleting the reference and adding it again and excluding the child form and including it again, but nothing works....
Can someone help me? What am i doing wrong?
URGENT!!!
Thanks in advance!
* pn**@portugalmail.pt (Pedro) scripsit: I have my base form, declared as musthinherit;
Public MustInherit Class frmsdvPrincipal
...
and my child form, declared as inherited;
Public Class frmsdvEtiquetas Inherits SDV.UL.Principal.frmsdvPrincipal
...
In run-time, frmsdvEtiquetas runs perfect, but in design time, this error occurs;
"The designer must create an instance of type 'SDV.UL.Principal.frmsdvPrincipal' but it cannot because the type is declared as abstract"
You cannot edit a form that inherits from a mustinherit form in the
windows forms designer because the designer must be able to instantiate
the base class.
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
"David Williams" <Da***********@discussions.microsoft.com> wrote in message news:<99**********************************@microso ft.com>... What I tend to do when I run into issues like this (which is as Herfried stated, you can not design a form that inherits from a MustInherit class,) is to do something like:
#If DEBUG Then Public Class fmsdvPrincipal #Else Public MustInherit frmsdvPrincipal #End If
However, there MIGHT be a problem with that in this case. If the class has any routines that you marked as MustOverride, you will have to change them, possiblly by wrapping in an #If as above, to Overridable and give no implementation details.
HTH -- David Williams, VB.NET MVP
"Herfried K. Wagner [MVP]" wrote:
* pn**@portugalmail.pt (Pedro) scripsit: I have my base form, declared as musthinherit;
Public MustInherit Class frmsdvPrincipal
...
and my child form, declared as inherited;
Public Class frmsdvEtiquetas Inherits SDV.UL.Principal.frmsdvPrincipal
...
In run-time, frmsdvEtiquetas runs perfect, but in design time, this error occurs;
"The designer must create an instance of type 'SDV.UL.Principal.frmsdvPrincipal' but it cannot because the type is declared as abstract"
You cannot edit a form that inherits from a mustinherit form in the windows forms designer because the designer must be able to instantiate the base class.
-- Herfried K. Wagner [MVP] <URL:http://dotnet.mvps.org/>
Thanks David;
Your suggestion works, but when i run my solution, a similar problem
with base form occurs.
Sometimes i have to comment the #if #else #endif code, close the
solution, open it again and both base and child form appears to open
in design mode.
After running my project once, the problem with child form appears...
That's when i uncomment the #if #else #endif code to resolve it. And
so on, and so on... Basically, i can have my base and child form
running on design mode, but only when i follow this steps and before
running my project.
Is this normal?
Thanks for the tip David...
"David Williams" <Da***********@discussions.microsoft.com> wrote in message news:<99**********************************@microso ft.com>... What I tend to do when I run into issues like this (which is as Herfried stated, you can not design a form that inherits from a MustInherit class,) is to do something like:
#If DEBUG Then Public Class fmsdvPrincipal #Else Public MustInherit frmsdvPrincipal #End If
However, there MIGHT be a problem with that in this case. If the class has any routines that you marked as MustOverride, you will have to change them, possiblly by wrapping in an #If as above, to Overridable and give no implementation details.
HTH -- David Williams, VB.NET MVP
"Herfried K. Wagner [MVP]" wrote:
* pn**@portugalmail.pt (Pedro) scripsit: I have my base form, declared as musthinherit;
Public MustInherit Class frmsdvPrincipal
...
and my child form, declared as inherited;
Public Class frmsdvEtiquetas Inherits SDV.UL.Principal.frmsdvPrincipal
...
In run-time, frmsdvEtiquetas runs perfect, but in design time, this error occurs;
"The designer must create an instance of type 'SDV.UL.Principal.frmsdvPrincipal' but it cannot because the type is declared as abstract"
You cannot edit a form that inherits from a mustinherit form in the windows forms designer because the designer must be able to instantiate the base class.
-- Herfried K. Wagner [MVP] <URL:http://dotnet.mvps.org/>
Hi!
I think i figure a way to control this inheritance issue in design/run
time, with your advances, but this design issue in vb.net is very
anoying! Now, i can't see my child form controls in run-time. They
appear normally in design but not in run-time! Why?
Any ideas?
Thanks in advance!
"David Williams" <Da***********@discussions.microsoft.com> wrote in message news:<99**********************************@microso ft.com>... What I tend to do when I run into issues like this (which is as Herfried stated, you can not design a form that inherits from a MustInherit class,) is to do something like:
#If DEBUG Then Public Class fmsdvPrincipal #Else Public MustInherit frmsdvPrincipal #End If
However, there MIGHT be a problem with that in this case. If the class has any routines that you marked as MustOverride, you will have to change them, possiblly by wrapping in an #If as above, to Overridable and give no implementation details.
HTH -- David Williams, VB.NET MVP
"Herfried K. Wagner [MVP]" wrote:
* pn**@portugalmail.pt (Pedro) scripsit: I have my base form, declared as musthinherit;
Public MustInherit Class frmsdvPrincipal
...
and my child form, declared as inherited;
Public Class frmsdvEtiquetas Inherits SDV.UL.Principal.frmsdvPrincipal
...
In run-time, frmsdvEtiquetas runs perfect, but in design time, this error occurs;
"The designer must create an instance of type 'SDV.UL.Principal.frmsdvPrincipal' but it cannot because the type is declared as abstract"
You cannot edit a form that inherits from a mustinherit form in the windows forms designer because the designer must be able to instantiate the base class.
-- Herfried K. Wagner [MVP] <URL:http://dotnet.mvps.org/>
Hi!
I think i figure a way to control this inheritance issue in design/run
time, with your advances, but this design issue in vb.net is very
anoying! Now, i can't see my child form controls in run-time. They
appear normally in design but not in run-time! Why?
Any ideas?
Thanks in advance! pn**@portugalmail.pt (Pedro) wrote in message news:<9f**************************@posting.google. com>... "David Williams" <Da***********@discussions.microsoft.com> wrote in message news:<99**********************************@microso ft.com>... What I tend to do when I run into issues like this (which is as Herfried stated, you can not design a form that inherits from a MustInherit class,) is to do something like:
#If DEBUG Then Public Class fmsdvPrincipal #Else Public MustInherit frmsdvPrincipal #End If
However, there MIGHT be a problem with that in this case. If the class has any routines that you marked as MustOverride, you will have to change them, possiblly by wrapping in an #If as above, to Overridable and give no implementation details.
HTH -- David Williams, VB.NET MVP
"Herfried K. Wagner [MVP]" wrote:
* pn**@portugalmail.pt (Pedro) scripsit: > I have my base form, declared as musthinherit; > > Public MustInherit Class frmsdvPrincipal > > ... > > and my child form, declared as inherited; > > Public Class frmsdvEtiquetas > Inherits SDV.UL.Principal.frmsdvPrincipal > > ... > > In run-time, frmsdvEtiquetas runs perfect, but in design time, this > error occurs; > > "The designer must create an instance of type > 'SDV.UL.Principal.frmsdvPrincipal' but it cannot because the type is > declared as abstract"
You cannot edit a form that inherits from a mustinherit form in the windows forms designer because the designer must be able to instantiate the base class.
-- Herfried K. Wagner [MVP] <URL:http://dotnet.mvps.org/>
Hi!
I think i figure a way to control this inheritance issue in design/run time, with your advances, but this design issue in vb.net is very anoying! Now, i can't see my child form controls in run-time. They appear normally in design but not in run-time! Why?
Any ideas?
Thanks in advance!
Sorry i wasn't very specific in the latest post! My child form
inherits anything from my base form. What i want is to add some
controls (not inherited) to my child form, but they only appear in
design! Why is that?
Help needed!
Thanks in advance! pn**@portugalmail.pt (Pedro) wrote in message news:<9f**************************@posting.google. com>... "David Williams" <Da***********@discussions.microsoft.com> wrote in message news:<99**********************************@microso ft.com>... What I tend to do when I run into issues like this (which is as Herfried stated, you can not design a form that inherits from a MustInherit class,) is to do something like:
#If DEBUG Then Public Class fmsdvPrincipal #Else Public MustInherit frmsdvPrincipal #End If
However, there MIGHT be a problem with that in this case. If the class has any routines that you marked as MustOverride, you will have to change them, possiblly by wrapping in an #If as above, to Overridable and give no implementation details.
HTH -- David Williams, VB.NET MVP
"Herfried K. Wagner [MVP]" wrote:
* pn**@portugalmail.pt (Pedro) scripsit: > I have my base form, declared as musthinherit; > > Public MustInherit Class frmsdvPrincipal > > ... > > and my child form, declared as inherited; > > Public Class frmsdvEtiquetas > Inherits SDV.UL.Principal.frmsdvPrincipal > > ... > > In run-time, frmsdvEtiquetas runs perfect, but in design time, this > error occurs; > > "The designer must create an instance of type > 'SDV.UL.Principal.frmsdvPrincipal' but it cannot because the type is > declared as abstract"
You cannot edit a form that inherits from a mustinherit form in the windows forms designer because the designer must be able to instantiate the base class.
-- Herfried K. Wagner [MVP] <URL:http://dotnet.mvps.org/>
Hi!
I think i figure a way to control this inheritance issue in design/run time, with your advances, but this design issue in vb.net is very anoying! Now, i can't see my child form controls in run-time. They appear normally in design but not in run-time! Why?
Any ideas?
Thanks in advance!
Sorry i wasn't very specific in the latest post! My child form
inherits anything from my base form. What i want is to add some
controls (not inherited) to my child form, but they only appear in
design! Why is that?
Help needed!
Thanks in advance!
"Pedro" <pn**@portugalmail.pt> wrote in message
news:9f**************************@posting.google.c om... pn**@portugalmail.pt (Pedro) wrote in message
news:<9f**************************@posting.google. com>... "David Williams" <Da***********@discussions.microsoft.com> wrote in
message news:<99**********************************@microso ft.com>... What I tend to do when I run into issues like this (which is as
Herfried stated, you can not design a form that inherits from a MustInherit
class,) is to do something like: #If DEBUG Then Public Class fmsdvPrincipal #Else Public MustInherit frmsdvPrincipal #End If
However, there MIGHT be a problem with that in this case. If the
class has any routines that you marked as MustOverride, you will have to
change them, possiblly by wrapping in an #If as above, to Overridable and
give no implementation details. HTH -- David Williams, VB.NET MVP
"Herfried K. Wagner [MVP]" wrote:
> * pn**@portugalmail.pt (Pedro) scripsit: > > I have my base form, declared as musthinherit; > > > > Public MustInherit Class frmsdvPrincipal > > > > ... > > > > and my child form, declared as inherited; > > > > Public Class frmsdvEtiquetas > > Inherits SDV.UL.Principal.frmsdvPrincipal > > > > ... > > > > In run-time, frmsdvEtiquetas runs perfect, but in design time,
this > > error occurs; > > > > "The designer must create an instance of type > > 'SDV.UL.Principal.frmsdvPrincipal' but it cannot because the type
is > > declared as abstract" > > You cannot edit a form that inherits from a mustinherit form in the > windows forms designer because the designer must be able to
instantiate > the base class. > > -- > Herfried K. Wagner [MVP] > <URL:http://dotnet.mvps.org/> >
Hi!
I think i figure a way to control this inheritance issue in design/run time, with your advances, but this design issue in vb.net is very anoying! Now, i can't see my child form controls in run-time. They appear normally in design but not in run-time! Why?
Any ideas?
Thanks in advance!
Sorry i wasn't very specific in the latest post! My child form inherits anything from my base form. What i want is to add some controls (not inherited) to my child form, but they only appear in design! Why is that?
Help needed! Thanks in advance!
Are you adding the controls to a panel or other container? If so, you need
to make sure the container control's modifier is not set to Private in the
base form (preferably, it would be set to Protected). The behavior you
describe happens when the modifier is set to Private.
"Pedro" <pn**@portugalmail.pt> wrote in message
news:9f**************************@posting.google.c om... pn**@portugalmail.pt (Pedro) wrote in message
news:<9f**************************@posting.google. com>... "David Williams" <Da***********@discussions.microsoft.com> wrote in
message news:<99**********************************@microso ft.com>... What I tend to do when I run into issues like this (which is as
Herfried stated, you can not design a form that inherits from a MustInherit
class,) is to do something like: #If DEBUG Then Public Class fmsdvPrincipal #Else Public MustInherit frmsdvPrincipal #End If
However, there MIGHT be a problem with that in this case. If the
class has any routines that you marked as MustOverride, you will have to
change them, possiblly by wrapping in an #If as above, to Overridable and
give no implementation details. HTH -- David Williams, VB.NET MVP
"Herfried K. Wagner [MVP]" wrote:
> * pn**@portugalmail.pt (Pedro) scripsit: > > I have my base form, declared as musthinherit; > > > > Public MustInherit Class frmsdvPrincipal > > > > ... > > > > and my child form, declared as inherited; > > > > Public Class frmsdvEtiquetas > > Inherits SDV.UL.Principal.frmsdvPrincipal > > > > ... > > > > In run-time, frmsdvEtiquetas runs perfect, but in design time,
this > > error occurs; > > > > "The designer must create an instance of type > > 'SDV.UL.Principal.frmsdvPrincipal' but it cannot because the type
is > > declared as abstract" > > You cannot edit a form that inherits from a mustinherit form in the > windows forms designer because the designer must be able to
instantiate > the base class. > > -- > Herfried K. Wagner [MVP] > <URL:http://dotnet.mvps.org/> >
Hi!
I think i figure a way to control this inheritance issue in design/run time, with your advances, but this design issue in vb.net is very anoying! Now, i can't see my child form controls in run-time. They appear normally in design but not in run-time! Why?
Any ideas?
Thanks in advance!
Sorry i wasn't very specific in the latest post! My child form inherits anything from my base form. What i want is to add some controls (not inherited) to my child form, but they only appear in design! Why is that?
Help needed! Thanks in advance!
Are you adding the controls to a panel or other container? If so, you need
to make sure the container control's modifier is not set to Private in the
base form (preferably, it would be set to Protected). The behavior you
describe happens when the modifier is set to Private. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Matt |
last post by:
I have created an MDI child form that I am using as a base form in a VB.Net
MDI application. The base MDI child form has a series of menu options on
it. I then use this form to create other MDI...
|
by: John Perks and Sarah Mount |
last post by:
Trying to create the "lopsided diamond" inheritance below:
>>> class B(object):pass
>>> class D1(B):pass
>>> class D2(D1):pass
>>> class D(D1, D2):pass
Traceback (most recent call last):
File...
|
by: Alex Hunsley |
last post by:
I've seen a few discussion about the use of 'super' in Python, including
the opinion that 'super' should only be used to solve inheritance
diamond problem. (And that a constructor that wants to...
|
by: Roman S. Golubin1709176985 |
last post by:
All how do you do!
Who what cases uses for C# programming?
I have an experience with Microsoft Visio several days. He has a problem
with interface inheritance...
óan who that other advise?
...
|
by: Darryn Ross |
last post by:
Hi..
I have a standard windows app in C#. The project contains a two forms and one class that i have created. I want both of the forms to inherit from the class but i am getting an error reading...
|
by: Mac via DotNetMonster.com |
last post by:
Hi all,
I have a creating a my own tabpage class (MyTabPage) which inherits the .Net
TabPage class.
In the relevant event I want to loop through the collection of TabPages and
then when I...
|
by: George Durzi |
last post by:
I'm converting a c# web application to support page inheritance so that I
can really change the look and feel of my application by only modifying the
..cs that my pages inherit from.
The only...
|
by: bill |
last post by:
What's up with inheritance in code behind? Is it reliable, or should I skip
it and forget about using inheritance in web forms until they get it right?
I'm using VB.NET 2005
I have a web form...
|
by: beseecher |
last post by:
Hi,
In my research in the javascript language I have encountered problems
with implementing prototype inheritance while preserving private
methods
functioning properly. Here is an example:
...
|
by: djboyse |
last post by:
Hey,
I'm kind of new to C++ and having some problems with inheritance. I've tried looking everywhere for some help, but I'm not too sure what to ask so please any input will be greatly...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |