473,320 Members | 2,097 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,320 software developers and data experts.

Visual Inheritance - Got Fix - Need Problem?

Howdy,

I haven't struck this before....

I am visually inheriting several forms from another.
All works well but then i thought i'd create an enum that is used only by
this form - not even its derived forms (inheritance aside).

I wasn't thinking and included the Enum definition in the same file as the
Base Form Class definition, scoped it as Friend and declaring it outside of
MyBaseForm. As opposed to a private/nested enum within MyBaseForm.

Subsequently all my child forms spat exceptions at me about not having the
base forms' .resources file included in the build, etc. This happened at
both and design and runtimes.

Now the fix was easy. Im not concerned about that.

But why did my oversight cause an exception to be thrown. Im glad it did,
but i dont see why it should as derived forms are inheriting from the
BaseForm "class", not "file".

Secondly why did it spit such a useless exception message at me. It seems
totally unrelated.

TIA
Richard

Nov 21 '05 #1
2 914
I tried to re-create your scenario and failed to get the error you refer to,
have you been able to repeat this ?

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me

Time flies when you don't know what you're doing

"Richard Myers" <ri*********************@basd.co.nz> wrote in message
news:O4**************@tk2msftngp13.phx.gbl...
Howdy,

I haven't struck this before....

I am visually inheriting several forms from another.
All works well but then i thought i'd create an enum that is used only by
this form - not even its derived forms (inheritance aside).

I wasn't thinking and included the Enum definition in the same file as the
Base Form Class definition, scoped it as Friend and declaring it outside of MyBaseForm. As opposed to a private/nested enum within MyBaseForm.

Subsequently all my child forms spat exceptions at me about not having the
base forms' .resources file included in the build, etc. This happened at
both and design and runtimes.

Now the fix was easy. Im not concerned about that.

But why did my oversight cause an exception to be thrown. Im glad it did,
but i dont see why it should as derived forms are inheriting from the
BaseForm "class", not "file".

Secondly why did it spit such a useless exception message at me. It seems
totally unrelated.

TIA
Richard


Nov 21 '05 #2
Hello Terry

Good point. I should have checked that before posting.

The answer is no i haven't, only in the original project.
If i reapply the enum twist as above then i do but not in a fresh project
with a couple of simple VI forms.

Toss this one in the NFT bin.

Cheers
Richard
Nov 21 '05 #3

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

Similar topics

2
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...
14
by: Steve Jorgensen | last post by:
Recently, I tried and did a poor job explaining an idea I've had for handling a particular case of implementation inheritance that would be easy and obvious in a fully OOP language, but is not at...
22
by: Matthew Louden | last post by:
I want to know why C# doesnt support multiple inheritance? But why we can inherit multiple interfaces instead? I know this is the rule, but I dont understand why. Can anyone give me some concrete...
30
by: Elhanan | last post by:
hi all i have a question in desgning a form.. the application in question is something a indexing station. the user in this indexing station views a document in pdf/tiff format on the right...
2
by: Mr Wizard | last post by:
I am going through the front controller http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpatterns/html/ImpFrontControllerInASP.asp and all works well except when the server.transfer...
6
by: VR | last post by:
Hi, I read about Master Pages in ASP.Net 2.0 and after implementing some WinForms Visual Inheritance I tryed it with WebForms (let's say .aspx pages, my MasterPage does not have a form tag itself...
6
by: Bart Schelkens | last post by:
Hi, i've created a base-form from which all the forms in my application need to inherit. This works just fine. I've put some buttons on my base-form. They are displayed correctly, only if my...
2
by: Ray Cassick \(Home\) | last post by:
Since I got such good feedback from the Xml comments question I will ask this of the group as well. Is VS.NET 2005 handling the visual inheritance problems centered around controls and forms...
3
by: Dino Buljubasic | last post by:
Hi, I am thinking of using visual inheritance. I am using C# VS 2005. I am concerned about how good it is. I have heard about problems like controls dissapearing or so. Any hints, tips,...
4
by: MikeB | last post by:
I've been all over the net with this question, I hope I've finally found a group where I can ask about Visual Basic 2005. I'm at uni and we're working with Visual Basic 2005. I have some books, ...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
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...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
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.