469,962 Members | 2,254 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,962 developers. It's quick & easy.

UserControl Auto Execute in DesignMode

I have a UserControl that execute methods in Load event,
but it hapens in designMode and generate an error and the
control disappear from the form.
I read that i can use the DesignMode to kwnow when my
control is in design or Runtime mode, it´s work, but when
this usercontrol is put in another usercontrol the
DesignMode property always return false.
How can I do to stop the methods to execute in
designMode when my usercontrol is in another usercontrol ?

Thanks, Tiago.
Nov 15 '05 #1
1 4725
Use the DesignMode boolean in the deepest layer of your controls, and any
subsequent controls. Whether it's in design mode is relative to the nest
level of user controls.

Nick Harris, MCP, CNA, MCSD
Director of Software Services
http://www.VizSoft.net
"Tiago Barbutti" <ti***********@pop.com.br> wrote in message
news:07****************************@phx.gbl...
I have a UserControl that execute methods in Load event,
but it hapens in designMode and generate an error and the
control disappear from the form.
I read that i can use the DesignMode to kwnow when my
control is in design or Runtime mode, it´s work, but when
this usercontrol is put in another usercontrol the
DesignMode property always return false.
How can I do to stop the methods to execute in
designMode when my usercontrol is in another usercontrol ?

Thanks, Tiago.
Nov 15 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Sascha | last post: by
1 post views Thread by René Paschold | last post: by
5 posts views Thread by Dennis | last post: by
reply views Thread by oliver | last post: by
2 posts views Thread by acadam | last post: by
1 post views Thread by rainxy | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.