encyclopegia.org

Control array

In Visual Basic, a control array is a group of related controls in a Visual Basic form that share the same event handlers. Control arrays are always single-dimensional arrays, and controls can be added or deleted from control arrays at runtime. One application of control arrays is to hold menu items, as the shared event handler can be used for code common to all the menu items in the control array. Control arrays are a convenient way to handle groups of controls that perform a similar function. All the events available to the single control are still available to the array of controls, the only difference being an argument indicating the index of the selected array element is passed to the event. Hence, instead of writing individual procedures for each control (i.e. not using control arrays), you only have to write one procedure for each array. Control arrays are no longer supported in Visual Basic 2006, as "changes to the event model" made them unnecessary. The Visual Basic Upgrade Wizard can convert code that uses control arrays into Visual Basic 2008 code that uses more recent structures.

In Visual Basic, a control array is a group of related controls in a Visual Basic form that share the same event handlers. Control arrays are always single-dimensional arrays, and controls can be added or deleted from control arrays at runtime. One application of control arrays is to hold menu items, as the shared event handler can be used for code common to all the menu items in the control array. Control arrays are a convenient way to handle groups of controls that perform a similar function. All the events available to the single control are still available to the array of controls, the only difference being an argument indicating the index of the selected array element is passed to the event. Hence, instead of writing individual procedures for each control (i.e. not using control arrays), you only have to write one procedure for each array. Control arrays are no longer supported in Visual Basic 2006, as "changes to the event model" made them unnecessary. The Visual Basic Upgrade Wizard can convert code that uses control arrays into Visual Basic 2008 code that uses more recent structures. ==References==

References

No reference rows published for this article.

Cite this article

MLA

"Control array." encyclopegia.org, 2024, https://encyclopegia.org/wiki/control-array. Accessed 23 November 2026.

Chicago

"Control array." encyclopegia.org. Accessed November 23, 2026. https://encyclopegia.org/wiki/control-array.

APA

encyclopegia.org. (2024). Control array. Retrieved November 23, 2026, from https://encyclopegia.org/wiki/control-array

Accessed November 23, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

Kassisaba

enwiki · references available

Keldrimäe

enwiki · references available

Luite

enwiki · references available

Raua

enwiki · references available

Andrew Mann Inn

enwiki · references available

Mohammad Reza Tahmasebi

enwiki · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1226305744 · 0.5 · snapshot enwiki-001226305744

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.