@ design time or @ runtime ?

  • Thread starter Thread starter Janiek Buysrogge
  • Start date Start date
J

Janiek Buysrogge

Hi,

Is there any kind of check like

#if DESIGNER
...
#endif

I don't want my control's OnLoad code to execute whan I drag it onto a
parent container, only when I run the application.

Thanks,

JB
 
Janiek,
Yes there is (it escapes me for the moment), there's something in the
System.ComponentModel.Design namespace (i think!) that you can check. I
assume you mean behavior like the fact a listbox displays it's name
only in design mode.

Hope that points you in the right direction,
James
 
Hi Janiek,

you can use the DesignMode property of your control or form (or any
Component).
But it doesn't work in the constructor of the Component!

hth

Christof
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top