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

Inherited form, exception thrown

Hi all,

I'm getting a strange exception and can't seem to figure this out.
I have a base-class form (call it BaseForm). I inherit from this publicly
for 2 sub forms (call them DerivedForm1 and DerivedForm2).

Both forms are "new"ed and then shown using ShowDialog(). This works fine.

However, when I exit the main form (the application), the program throws an
exception. And this only happens if DerivedForm2 is created and shown.

The exception says:
----------
An unhandled exception of type 'System.MethodAccessException' occurred in
system.dll

Additional information: Base.BaseForm.Dispose(Boolean)
-----------

I am not calling Dispose anywhere in the Derived form.

Does anyone have any ideas?
Thanks,
Matt.
Nov 17 '05 #1
0 738

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

Similar topics

0
by: Scott Adams | last post by:
I am experiencing an odd issue when my form is minimized. Upon activation, my form refreshes some data within a DataGrid control. No exception is thrown until the form is minimized, then restored...
6
by: iucon | last post by:
Hello. I'm trying to serialize an inherited Class by a Webservice. Here ist a Code-Snippet of the Classes I try to serialize: // Base-Class public class Test { private string _Argument1;...
5
by: n_o_s_p_a__m | last post by:
Can't compile. Does this mean that all functions that throw exceptions must be of return type void? examples: // won't compile: "not all code paths return a value" public override int Run() {...
2
by: Stephen Lamb | last post by:
What type(s) of exceptions will be thrown when calling Form.Invoke when the handle for the form has yet to be created? MS only states, "If no appropriate handle can be found, the Invoke method...
2
by: Rogerio Jun | last post by:
Hi I try load a form with reflection : Assembly myAssembly = Assembly.LoadFrom(dtr.GetString(0)); Form frmForm = myAssembly.CreateInstance("Nox.Grade") as Form; but a NullReferenceException...
0
by: Frnak McKenney | last post by:
I'm running into problems with VisualStudio.NET2003 and Windows Forms inheritance. It _feels_ like a bug, but it could just as well be a misunderstanding on my part regarding how the VS Designer...
0
by: JWA | last post by:
Hi All, How can you capture unhandled exceptions thrown by an MDI child form separate from the entire app? I have an application-wide exception handler to catch crashes by doing the following...
132
by: Zorro | last post by:
The simplicity of stack unraveling of C++ is not without defective consequences. The following article points to C++ examples showing the defects. An engineer aware of defects can avoid...
5
by: aine_canby | last post by:
Hi, The problem is that the line - this.Invoke(new MyDelegate(Function), args); // this = MainForm is being called after the line - terminatePopulate = true; therefore I get an exception...
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...
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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
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...

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.