PC Review


Reply
Thread Tools Rate Thread

Base's load event fires when inheriting form in design view

 
 
Enrico Angka
Guest
Posts: n/a
 
      5th Sep 2003
I have a windows form in my class library that implements
a load event. The load event calls the MessageBox.Show()
method.

I created a class that inherits that form
programmatically. When I open the inheriting class in
design view, the base load event fires and calls the
MessageBox.Show(). I tried the "Add Inherited Form"
wizard and it did the same thing.

Is this normal? If so, is there a way of suppressing the
load event at design time?

Thank you for the support.

Sincerely,

Enrico
 
Reply With Quote
 
 
 
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      5th Sep 2003
"Enrico Angka" <(E-Mail Removed)> schrieb:
> I have a windows form in my class library that implements
> a load event. The load event calls the MessageBox.Show()
> method.
>
> I created a class that inherits that form
> programmatically. When I open the inheriting class in
> design view, the base load event fires and calls the
> MessageBox.Show(). I tried the "Add Inherited Form"
> wizard and it did the same thing.
>
> Is this normal? If so, is there a way of suppressing the
> load event at design time?


In the base class's 'Load' event handler:

\\\
If Not Me.DesignMode Then
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
cannot get form to load appropriate data -- unless it is in design view! Lee Taylor-Vaughan Microsoft Access Form Coding 0 2nd May 2004 10:42 AM
Cannot open derived form in design view if the base form is marked 'abstract'. Yasutaka Ito Microsoft Dot NET 2 26th Jan 2004 04:37 PM
Cannot open derived form in design view if the base form is marked 'abstract'. Yasutaka Ito Microsoft Dot NET Framework Forms 3 26th Jan 2004 04:37 PM
Inheriting from base form Andy Breward Microsoft ASP .NET 1 7th Nov 2003 06:15 AM
base form's load event gets fired when form designer open. feng Microsoft VB .NET 3 10th Oct 2003 07:48 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:12 AM.