Designing Windows Forms

  • Thread starter Thread starter Joey Callisay
  • Start date Start date
J

Joey Callisay

I have this 3 boolean properties for my base form which defines whether it uses 3 controls.

Efficiency wise, the three controls should only be instantiated when their corresponding property is set to true. So I have this private method which is called on the constructor of the base form after InitializeComponent which Initializes or disposes the said control dependent on their associated boolean property.

I am not that fully aware of CodeDom though I know that it can generate custom code lines for me. I wanted a what-you-see-what-you-get implementation of my forms so here are my questions.

1. Is CodeDom a better way of implementing such functionality for my base form? (before I read articles about this class)
2. I know I can use CodeDom to generate initialization lines for the corresponding control when its property is set (true), can it be also used to delete such lines if the property is reset (false)
3. Any comments on my design would be appreciated.

Thanx a lot...
 
Joey,

I believe the codeDom is for creating code (.vb files) to be compiled. I believe what you are saying is don't want to create instances of objects until they are needed right?



-Calvin Luttrell
ProjectThunder.com, Inc.
Torrance, Ca
My Profile


Note: The information contained in this email and document(s) attached are for the exclusive use of the addressee and may contain confidential, privileged and non-disclosable information. All information is provided on a 'as is' basis.


"Efficiency wise, the three controls should only be instantiated when their corresponding property is set to true. So I have this private method which is called on the constructor of the base form after InitializeComponent which Initializes or disposes the said control dependent on their associated boolean property.

I am not that fully aware of CodeDom though I know that it can generate custom code lines for me. I wanted a what-you-see-what-you-get implementation of my forms so here are my questions.

1. Is CodeDom a better way of implementing such functionality for my base form? (before I read articles about this class)
2. I know I can use CodeDom to generate initialization lines for the corresponding control when its property is set (true), can it be also used to delete such lines if the property is reset (false)
3. Any comments on my design would be appreciated.
 
Back
Top