472,119 Members | 2,016 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

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 4828
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
reply views Thread by leo001 | 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.