473,385 Members | 1,720 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,385 software developers and data experts.

UserControl - DesignerMode

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 the properties window, is
the UserControl Property "set" called which executes the procedures called in
the set routine of the property?
--
Dennis in Houston
Nov 21 '05 #1
5 1658
Yes.
You can place a Msgbox in the Set block, and re-compile your project. When
you open a control in the form designer which has the user control added to
it, a message box will pop up.

"Dennis" <De****@discussions.microsoft.com> wrote in message
news:3C**********************************@microsof t.com...
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 the properties window,
is
the UserControl Property "set" called which executes the procedures called
in
the set routine of the property?
--
Dennis in Houston

Nov 21 '05 #2
Yes, the entire code in your set is executed at runtime AND at design time.
----------------
-Atul, Sky Software http://www.ssware.com
Shell MegaPack For .Net & ActiveX
Windows Explorer GUI Controls
&
Quick-Launch Like Appbars, MSN/Office2003 Style Popups,
System Tray Icons and Shortcuts/Internet Shortcuts
----------------
"Dennis" <De****@discussions.microsoft.com> wrote in message
news:3C**********************************@microsof t.com...
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 the properties window,
is
the UserControl Property "set" called which executes the procedures called
in
the set routine of the property?
--
Dennis in Houston

Nov 21 '05 #3
"Dennis" <De****@discussions.microsoft.com> schrieb:
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 the properties window,
is
the UserControl Property "set" called which executes the procedures called
in
the set routine of the property?


Yes. You can use the control's 'DesignMode' property to check if it is
shown in design mode.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #4
I put the msgbox in the set of one of my properties and nothing happens when
I reset the proerty in the designer property box.
--
Dennis in Houston
"Kai Zhang" wrote:
Yes.
You can place a Msgbox in the Set block, and re-compile your project. When
you open a control in the form designer which has the user control added to
it, a message box will pop up.

"Dennis" <De****@discussions.microsoft.com> wrote in message
news:3C**********************************@microsof t.com...
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 the properties window,
is
the UserControl Property "set" called which executes the procedures called
in
the set routine of the property?
--
Dennis in Houston


Nov 21 '05 #5
I have three properties: AutoFill, AutoFit, and AutoSize. In each of these
properties "set" block, I set the other two to false if the one being set is
true since only one can be true at one time. When I set one of them to True
in the Designer Property box, the others do not change to false. How do I
get them to change in the Designer property box?
--
Dennis in Houston
"Herfried K. Wagner [MVP]" wrote:
"Dennis" <De****@discussions.microsoft.com> schrieb:
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 the properties window,
is
the UserControl Property "set" called which executes the procedures called
in
the set routine of the property?


Yes. You can use the control's 'DesignMode' property to check if it is
shown in design mode.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Dave Veeneman | last post by:
Is there a simple way to pass drag-and-drop events to a child control in a UserControl? Here's an example: I have created a UserControl which contains a treeview and some text boxes. I want to...
8
by: Raed Sawalha | last post by:
Hi, I have a strange problem with a usercontrol on a page. The usercontrol dispalyes three categories (From a database) when the user clicks a category they see all the products in a shop for...
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...
41
by: JohnR | last post by:
In it's simplest form, assume that I have created a usercontrol, WSToolBarButton that contains a button. I would like to eventually create copies of WSToolBarButton dynamically at run time based...
12
by: Joe | last post by:
Hello All: Do I have to use the LoadControl method of the Page to load a UserControl? I have a class which contains three methods (one public and two private). The class acts as a control...
9
by: Marcelo Cabrera | last post by:
Hi, I have a user control that in turn creates a bunch of webcontrols dynamically and handles the events these webcontrols raise. It used to work fine on ASP .Net 1.1 but when compiled on 2.0 it...
0
by: academic | last post by:
When I show the Designer I get a lot of flashing. What I need to know is: What events are triggered when I open the Designer. In Paint I exit if in DesignerMode and that didn't fix it. ...
6
by: MeowCow | last post by:
I have created a UserControl that encapsulates a third party data grid. My goal was to create my own DataSource and DataMember properties that forward the binding to the third party grid, then use...
10
by: Benton | last post by:
Hi there, I have a UserControl with a couple of textboxes and a couple of buttons ("Save" and "Cancel"). The Click event for this buttons is in the UserControl's codebehind of course, so here's...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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:
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...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.