all groups > dotnet windows forms designtime > may 2005 >
You're in the

dotnet windows forms designtime

group:

DesignTime property



Re: DesignTime property Bob Powell [MVP]
5/30/2005 12:00:00 AM
dotnet windows forms designtime: The form seen in the designer is not actually an instance of the Form1 class
you're designing but a simple form with the relavent controls added to it.
Custom controls however are instances of the real thing so you could create
a custom control that covered the form entirely and do design-time detection
on that. You may also be able to do design time detection on a derived form
that uses visual inheritance. In any case, the DesignMode property is never
valid in the constructor.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.





[quoted text, click to view]

DesignTime property Egil Winther
5/30/2005 10:00:45 AM
Hi,

We're having a problem with the forms DesignMode property which is always
false.
I checked around, and found that the forms Site property is null.

Does anyone know how this can happen, and what to do about it?

Rgds
Egil Winther
ShipNet AS

Re: DesignTime property Egil Winther
5/31/2005 12:00:00 AM
Thanks Bob,

I just moved my code from the constructor to the Load-event, and everything
was fine.

Rgds
Egil Winther
ShipNet AS


[quoted text, click to view]

AddThis Social Bookmark Button