471,109 Members | 1,023 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,109 software developers and data experts.

Control in Runtime vs Designtime

I would like to be able to tell whether my component code is executed when I
instanciate a control in runtime or in designtime.

Can anybody give me a clua as to how you can do that?

Cheers,
Johnny J.
Aug 14 '07 #1
2 1597
use the DesignMode - Property

Control ctrl = new Control();
if (ctrl.DesignMode)
{
//is in designMode
}
Aug 14 '07 #2
Thanks both of you - It was much simpler than I had expected... ;-)

/Johnny J.

"Johnny Jörgensen" <jo**@altcom.sewrote in message
news:Oe**************@TK2MSFTNGP06.phx.gbl...
>I would like to be able to tell whether my component code is executed when
I instanciate a control in runtime or in designtime.

Can anybody give me a clua as to how you can do that?

Cheers,
Johnny J.

Aug 14 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Weinand Daniel | last post: by
1 post views Thread by Green | last post: by
10 posts views Thread by Yuk Tang | last post: by
7 posts views Thread by Varangian | last post: by
2 posts views Thread by rotsj | last post: by
2 posts views Thread by Johnny Jörgensen | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.