World Library  
Flag as Inappropriate
Email this Article

Visual Component Library

Article Id: WHEBN0000274874
Reproduction Date:

Title: Visual Component Library  
Author: World Heritage Encyclopedia
Language: English
Subject: Delphi (programming language), OpenWire (library), FireMonkey, Lazarus (IDE), VCL
Collection: Borland, Component-Based Software Engineering, Computer Libraries, Pascal Libraries
Publisher: World Heritage Encyclopedia

Visual Component Library

Visual Component Library (VCL)
Original author(s) Borland
Developer(s) Embarcadero Technologies
Initial release 1995
Development status Active
Operating system Cross-platform (Windows, Mac OS X, iOS, Android)
Type GUI
License Commercial

The Visual Component Library (VCL) is a visual component-based object-oriented framework for developing the user interface of Microsoft Windows applications. It is written in Object Pascal.


  • History 1
  • Technology 2
  • Related frameworks 3
  • See also 4
  • References 5
  • External links 6


The VCL was developed by Borland for use in, and is tightly integrated with, its Delphi and C++Builder RAD tools.

In 1995 Borland released Delphi, its first release of an Object Pascal IDE and language. Up until that point, Borland's Turbo Pascal for DOS and Windows was largely a procedural language, with minimal object-oriented features, and building UI frameworks with the language required using frameworks like Turbo Vision and Object Windows Library. OWL, a similar framework to MFC, required writing code to create UI objects.

A key aim of the VCL combined with the Delphi language was to change the requirements of building a user interface. (For context, the Delphi variant of Pascal had a number of innovative object-oriented features, such as properties and runtime type information, inspired by Modula and Smalltalk.) At the time, much UI code work required creating classes inheriting from other classes, and customized objects were often not reusable (for example, a button that performs a specific action cannot be reused in a different application.)[1] UI code was also complicated, forcing the programmer to understand and use the Windows API, manage GDI resources, etc.[2] Finally, a visual user interface arguably should be designed visually, and yet most tools to do so - at the time, mainly Visual Basic - did so in terms of the designer outputting code, creating a fragile, un-manually-editable situation - a problem that still persists today with many UI frameworks, particularly C++-based ones such as Qt.[3]

The combination of the Delphi language and the VCL framework written in that language addressed these by:

  • A streaming framework, allowing an object and subobjects to be streamed to text or binary format - TComponent, the root class of the VCL framework
  • A form designer that saved to a stream, saving the description of the objects not the code required to create them, with objects capable of self-creation when streaming the description back in
  • Language features that allowed instances of a class to be customised without subclassing, in two ways: first, through the use of properties, allowing instances of an object to have its own fields (such as a caption) easily changed through streaming; second, by allowing events - method pointers called at specific places in code - to be handled by another object; that is the method pointers were attached to an object instance.[4] In other words, this creates "custom behaviours through delegation instead of inheritance".[5]
  • Controls that wrapped native Windows controls, in framework that managed resources[6]

The combination of these resulted in a visual designer that streamed a description; a form (window) that constructed itself from that description, including creating all the other components on that form; and code being written in one place (methods on the form) that could be called by UI elements in response to certain actions, such as a button being clicked calling an OnClick event handler implemented in the form code. At the time this was revolutionary, while today it is an approach used by several other frameworks, such as WinForms and Cocoa.

This also allowed new components - new visual or non-visual classes - to be written easily. The VCL is Windows-based and its implementations of common controls are wrappers of the Windows API, thus is close to the ground and fully native. New controls can be implemented from scratch or can use existing Windows controls.

With the release of C++ Builder, the Delphi compiler could emit C++ header files for compiled Delphi-language units, and so the flexibility of the streaming, visually designed UI framework became available for C++. VCL components can in fact be written in C++, but ultimately inherit from Delphi ancestors, since the C++Builder compiler and linker can consume object and header files produced by Delphi. This was one of the first examples of cross-language compatibility, something unseen until .Net.

Today the VCL includes several hundred visual and non-visual components, usable in both the Delphi and C++ languages.


VCL forms a Class (object-oriented programming) hierarchy with a common ancestor, the TComponent class (which inherits from TObject, the root class in Delphi Object Pascal). This is a common approach shared by the Java programming language, Smalltalk, C# and many other object-oriented programming languages.

VCL components cover Windows controls like windows (TForm Class (object-oriented programming)), controls (e.g., TButton, TCheckBox, TLabel classes) as well as database access (e.g., ADO or IBX components) or Internet connections (Indy components). The component approach allows programmers to extend the VCL with many visual and non-visual additional components. There is a large number of free and commercial component packages. Among them are JEDI, TMS, Developer Express, Mitov Software, Raize Software, TurboPower, IOComp, SDL, DA-SOFT Technologies and many others.

While not all VCL components are thread-safe, VCL supports multi-threading too. One example is the built in multi-threading support of the OpenWire VCL library.

VCL provides native support for PME (Properties, Methods and Events) model at the .NET level.

Much of the .NET design, especially WinForms, is modeled after the VCL. One of the main architects of the first Delphi versions, Anders Hejlsberg, was hired by Microsoft and became one of the main architects of .NET. This became the subject of a lawsuit: at the time (1996), "Borland alleged that Microsoft had hired 34 Borland employees over the past 30 months in order to steal Borland trade secrets. Borland also claimed that Microsoft offered and delivered expensive lures to Borland workers. In two cases, incentives topping $1 million were involved."[7] According to, the bonus was three million dollars in Anders' case. Many Delphi developers find C# quite familiar, due to the design similarities.[8]

Related frameworks

A cross-platform equivalent of the VCL, called CLX (Component Library for Cross Platform), was later developed for use in Delphi, C++Builder and Kylix in 2000-2001. However, it was abandoned.

A second cross-platform framework, FireMonkey, was integrated into Delphi and C++Builder XE2 in 2011. FireMonkey is a vector-based WPF-like framework for UIs on Windows, OSX, iOS and Android.

The Lazarus_(IDE) project has a portable (*nix, OS/X, Win32/64+wince) equivalent called LCL, which was already working when Kylix and CLX emerged. The project maintained its course and ignored Kylix (and later FMX)

LibreOffice contains an unrelated graphic library also called Visual Components Library (VCL).

See also


  1. ^ Delphi Component Design, Danny Thorpe, p9
  2. ^ Delphi Component Design, Danny Thorpe, p11
  3. ^
  4. ^
  5. ^ Delphi Component Design, Danny Thorpe, p12
  6. ^
  7. ^
  8. ^

External links

  • Torry's Delphi Pages The main repository for free and commercial VCL components
  • JEDI Visual Component Library (JVCL) and JEDI Code Library (JCL): huge open source collection of components based on VCL
  • TMS software Company providing a wide range of professional VCL components
  • Mitov Software Company providing Video, Audio, DSP, Computer Vision, and data visualization VCL components
  • CodePedia C++ VCL page (no Pascal page yet)
  • DA-SOFT Technologies Company providing high-speed data access VCL libraries
  • Steema Software Company providing Teechart VCL Charting Component library
  • Epina GmbH Company providing the SDL Component Suite (VCL collection)
This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.

Copyright © World Library Foundation. All rights reserved. eBooks from Project Gutenberg are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.