473,395 Members | 1,484 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,395 software developers and data experts.

Inherit Form

Hi all expert,

I need to create a baseform with MustOverride function, but i found that
once I had the parent form with mustoverride function, the child form are
not displayable in design view.

What had I had wrong?

Thanks alot.

Nov 21 '05 #1
4 1317
If you have a mustoverride function then the form becomes Mustinherit.

MustInherit forms cannot be instantiated but, the designer needs to
instantiate it to display the derived form.

Thus the problem.

hth,
Alan.

Nov 21 '05 #2
Hi alan,
sorry that, I still do not understand how I can make my child form
display able at design view...
can u briefly describe how? thanks a lot.

<al*******@users.com>
???????:11**********************@o13g2000cwo.googl egroups.com...
If you have a mustoverride function then the form becomes Mustinherit.

MustInherit forms cannot be instantiated but, the designer needs to
instantiate it to display the derived form.

Thus the problem.

hth,
Alan.

Nov 21 '05 #3
He's saying that you can't.

_________________________________________
The Grim Reaper

<Windy> wrote in message news:%2****************@TK2MSFTNGP15.phx.gbl...
Hi alan,
sorry that, I still do not understand how I can make my child form
display able at design view...
can u briefly describe how? thanks a lot.

<al*******@users.com>
???????:11**********************@o13g2000cwo.googl egroups.com...
If you have a mustoverride function then the form becomes Mustinherit.

MustInherit forms cannot be instantiated but, the designer needs to
instantiate it to display the derived form.

Thus the problem.

hth,
Alan.


Nov 21 '05 #4
<Windy> wrote in message news:%2****************@TK2MSFTNGP10.phx.gbl...
I need to create a baseform with MustOverride function,
Actually, you don't, because currently, you can't.
i found that once I had the parent form with mustoverride function,
the child form are not displayable in design view.


because the Form's designer really *does* need to instantiate
your "abstract" form before it can use it.
(Don't know if this changes with VS'2005).

Remove the "MustOverride" keyword and add a very simple, if
annoying, implementation, something like

Protected Overridable Sub Beep()
If Not System.Diagnostics.Debugger.IsAttached Then
Throw New NotImplementedException()
End If
End Sub

People will get the idea *very* quickly ... ;-)

HTH,
Phill W.
Nov 21 '05 #5

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

Similar topics

1
by: juli | last post by:
I am trying to make an instance of a form in another form after inhereting it (with :) but it's not working,I can't see the class.Why and how can I do it? Another question, If I have 2 classes I...
6
by: Mohammad-Reza | last post by:
I wrote a component using class library wizard. In my component i want to in order to RightToLeft property do some works. I can find out if user set this property to Yes or No, But if He/She set it...
5
by: Mike L | last post by:
This is my first attempt at inheriting a class. I want to inherit textbox class to my derived class ClassNum. ClassNum will override the TextChanged, Leave, KeyPress and Enter methods. So,...
0
by: varun varun | last post by:
hello friend, while developing an asp.net application, i created a base form(say mybaseform1) with certain links on it. then i tried to inherit the same from in other application forms by...
4
by: David | last post by:
I have trying to have a webform inherit controls from another form and can't get it to work Say I have a form that saves the person's demographic info. ****one.aspx**** //I have an object...
0
by: Zhi | last post by:
i have base form that contains a public imagelist. the image list has several images in it. my child forms inherit this base form and the imagelist. the inheritted imagelist contains all the images...
2
by: Wu Qinliang | last post by:
I created a Windows form named myform1, and put some controls on it. I need another form named myform2. Because myform2 is similar to myform1, so I want myform2 to inherit from myform1, i.e: ...
3
by: Station Media | last post by:
Hi everybody, I need to create a custom button for all our internal applications, and i would like to know what is the best for this type of control(button), is it to inherit standard button or...
2
by: harvie wang | last post by:
Hi, I want to implement a common Form with special interface, such as MovePoint(double,double). I create a interface first: namespace ABC.Test { public Interface IMyWindowInterface { void...
1
by: Ronald S. Cook | last post by:
I have many forms in my Windows project. When I go to create an inherited form, I see all my forms in the list of choices. HOWEVER, if any form is marked as must inherit, then it doesn't show up...
0
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...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
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...
0
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...
0
marktang
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,...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.