Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / Design Time / August 2004

Tip: Looking for answers? Try searching our database.

error when trying to add inherited form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
chris yoker - 06 Aug 2004 09:45 GMT
Hiya,

I get an error when I try to add a particular type of "inherited form" to my app.
I try to add it thru the following steps:

1) right click the selected project
2) >Add
3) >inherited form

<error>
An exception System.ExecutionEngineException has occurred in the
default domain
<\error>

The debugger chokes in the following lines of a Utility.vb class:

<code>
For Each attr As System.Attribute In type.GetCustomAttributes(True)

           If attr.GetType.FullName = attributeName Then
             Return attr
           End If
Next
<\code>

Even when I commment this code out, it still throws an error at this line.

I can confirm that:

1) the inherited form that is ALREADY in the solution works
without hassle.
2) there are  .resx files involved, (if this is relevant)
3) I have of course been playing around with the code :-)

Does windows initialise some code in an inherited form, even though I am only adding it to a solution in "design time" mode, ie I'm not actually RUNNING the app?

All pointers appreciated, I can clarify any ambiguity in my post :-)

yogi
Andy Becker - 06 Aug 2004 15:53 GMT
> Does windows initialise some code in an inherited form, even though I am only adding it to a solution in "design time" mode, ie I'm not actually
RUNNING the app?

Yes...  In fact, the form's Load event gets fired, among other things -
ParentChanged, etc.  I would venture a guess that the code from Utility.vb
does not need to be called for design-time.

You can check the DesignMode property to determine whether to run stuff or
not.  Note that it will not work from a constructor (it is always false).  I
guess it's not known until after the object is created and sited to a
designer from that this can be known.

Best Regards,

Andy

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.