Re: Where does the designer code come from?
- From: "schneider" <eschneider@xxxxxxxxxxxxx>
- Date: Mon, 16 Jul 2007 21:54:48 -0500
Yes, I guess I should have said "What .NET objects are used to generate the
code?" I want to alter the behavior.
Thanks,
Schneider
"OD" <webmaster @ e-naxos dot com> wrote in message
news:mn.7b647d77437ca577.18651@xxxxxxxxxxxxxxxx
How does the designer determine what code is used in the form designer
code?
For example 1, when you drag a control (using the object name?):
private System.Windows.Forms.TextBox txtUserName;
this.txtUserName = new System.Windows.Forms.TextBox();
When you drag a component onto the designer surface, VS is knowing the
class, then using reflection, it can get the list of public properties and
events. As all components must implement IComponent (providing
functionnality required by all components) and must inherit from Control,
it is easy to generate the "new" code and to manage other common component
behaviors.
Nothing really magic, just object programming :-)
--
OD___
www.e-naxos.com
.
- References:
- Where does the designer code come from?
- From: schneider
- Where does the designer code come from?
- Prev by Date: Where does the designer code come from?
- Next by Date: Re: Where does the designer code come from?
- Previous by thread: Where does the designer code come from?
- Next by thread: Re: Where does the designer code come from?
- Index(es):
Relevant Pages
|
|