save up to 40%

How can the properties of a constituent control be exposed using Visual Basic project?

Are you preparing for IT certification? With practice questions, study notes, interactive quizzes, tips and technical articles, uCertify PrepKits ensure that you get a solid grasp of core technical concepts to ace your certification exam in first attempt.

How can the properties of a constituent control be exposed using Visual Basic project?

Rating:

The properties of a constituent control can be exposed by the following ways:

  • Creating a public property in a user control.

  • Using the getter and setter for a property in the property definition. It will effect the change in the
    private property of the constituent control.
For example, a constituent button named MyButton1 is used with a user control. A property can be created in a user control named MyButtonColor. When a user requests the ForeColor property of a constituent control, its value is returned in the get code. The property is then set in the set code, as shown below:

Public Property MyButtonColor() As System.Drawing.Color
   Get
      Return MyButton1.ForeColor
   End Get
   Set(Value As System.Drawing.Color)
      MyButton1.ForeColor = Value
   End Set
End Property


Rating:



Other articles

Click here to Article home

 
uCertify.com | Our Company | Articles | Privacy | Security | Contact Us | News and Press Release | uCertify India
MCSE: MCSA, MCTS, MCITP    JAVA Certification: SCJP, SCWCD Cisco Certification: CCNA, CCENT, A+, Network+, Security+
Oracle Certification: OCP 9i, OCP 10g, OCA 9i, OCA 10g CIW foundation    EC-212-32    CISSP    Photoshop ACE    Adobe Flash ACE
© 2008 uCertify.com. All rights reserved. All trademarks are the property of their respective owners.