HighTechTalks DotNet Forums  

Design Time Inheriting of forms

Dotnet Framework (WinForms DesignTime) microsoft.public.dotnet.framework.windowsforms.designtime


Discuss Design Time Inheriting of forms in the Dotnet Framework (WinForms DesignTime) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Roger Webb
 
Posts: n/a

Default Design Time Inheriting of forms - 12-04-2004 , 11:44 AM






I'm trying to inherit from a form I've got. Seems easy enough, however, in
the base form's Load Event I have something that runs off to a config file
on disk (To set the runtime control values). When I inherit this form, it
tells me it had an error in creating it because the file doesnt exist and it
actually says the config files name. How do you inherit from a form that
references a config file (during RunTime) so that you can change it in
design time. Why is it trying to run the Form_Load event during designtime
anyway?

Does this make sense?

- Roger



Reply With Quote
  #2  
Old   
joeycalisay
 
Posts: n/a

Default Re: Design Time Inheriting of forms - 12-05-2004 , 07:40 PM






Form Load loading from a config file should only be executed at run time, it
should be enclosed in a block like this:

if (!DesignMode)
{
}

"Roger Webb" <rwebb (AT) nos (DOT) twia.org> wrote

Quote:
I'm trying to inherit from a form I've got. Seems easy enough, however,
in
the base form's Load Event I have something that runs off to a config file
on disk (To set the runtime control values). When I inherit this form, it
tells me it had an error in creating it because the file doesnt exist and
it
actually says the config files name. How do you inherit from a form that
references a config file (during RunTime) so that you can change it in
design time. Why is it trying to run the Form_Load event during designtime
anyway?

Does this make sense?

- Roger





Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.