473,387 Members | 2,436 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 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 4912
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Lucas Sain | last post by:
Hi, How can I make a code in an event not execute in design time. I have a Baseform that has X code in the event "VisibleChanged". All my forms inherit from this form. The code in this event...
2
by: Jim | last post by:
I have some complex (fairly) user controls that I have created. Some of those user controls host other user controls. When I host one of these on a WinForm, I sometimes run into problems where...
3
by: Tony Maresca | last post by:
Hi. I have a class derived from a UserControl, that I want to allow others to derive controls from. I don't want them to design the base class (which is derived from a UserControl). I know that...
1
by: Ben Fidge | last post by:
As the Web UserControl class has no DesignMode property (it's not derived from Component), how do you tell if your UserControl is running in the IDE. I've got a public property on my UserControl...
2
by: Sascha | last post by:
Hi there, I searched carefully through the web before finally deciding to post this message, because I could not find a solution for my problem. Hopefully someone will have a hint or explanation...
1
by: René Paschold | last post by:
Hello there, i want to write my on control. Its a control which contains a collection of other controls like TextBox and more. So i want to have a border like the Panel Control only for...
5
by: Dennis | last post by:
I have a UserControl with several Browsable properties. In some of the properties "Set", I execute code that calls other procedures in my control. In the Design Mode when the properties are set in...
0
by: oliver | last post by:
QUESTION: How to access an object embedded in a UserControl through Javascript file? Another way to ask this question: How to execute script from a UserControl, accessing other objects in that...
2
by: acadam | last post by:
In my application I have a usercontrol called "base" with a panel called "pnl1"; in "pnl1" I put my usercontrol. Now I would like to have 2 possibilities: from "base" to load another control...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.