Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.

Tip of the Day
Language: Visual Basic
Expertise: Intermediate
Aug 20, 1997



Application Security Testing: An Integral Part of DevOps

Use the Controls Collection

If you need to reference every control on a form, using the Controls collection will be faster than referencing every control directly. For example, if you have four command buttons on a form and you want to set the Enabled property to False for all of them, you have two options.
Option 1:
 cmdAdd.Enabled = False 
cmdEdit.Enabled = False 
cmdDelete.Enabled = False 
cmdNext.Enabled = False 

Option 2 will execute approximately 10 to 15 percent faster than Option 1:
 For iLoop = 0 To 3 
Controls(iLoop).Enabled = False 
Paul D. Sheriff
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date