This section provides how-to information on developing VCL for Win32 applications.
Name |
Description |
This "Hello World" console application demonstrates the essential steps for creating a Windows application in Delphi or C++. The application uses Windows, a console window, an event, and will display a dialog in response to a user action. | |
The following procedure illustrates the essential steps for building a Windows application. | |
Menus provide an easy way for your users to execute logically grouped commands. You can add or delete menu items, or drag them to rearrange them during designtime. In addition to TMainMenu and TPopupMenu components, the Tool Palette also contains TActionMainMenuBar, TActionManager, and TActionToolBar. | |
Creating a form with tables and graphs of multidimensional data consists of the following major steps:
| |
Each of the procedures listed below builds a VCL Form application that uses graphics. Build one or more of the examples and then add other graphics features to these basic VCL Form applications.
| |
The VCL Forms MDI application wizard automatically creates a project that includes the basic files for an MDI application. In addition to the Main source file, the wizard creates unit files for child and about box windows, along with the supporting forms files and resources. | |
| |
| |
You can use the New VCL Component wizard to create a new VCL component for your application. The wizard detects the personality of the product you are using and creates the appropriate type of component. | |
The following procedure describes how to build an ADO database application. Building a VCL ADO application consists of the following major steps:
| |
The following procedure illustrates the essential steps to building a VCL Forms application using RAD Studio. | |
Using RAD Studio, the following procedure illustrates how to create actions using the ActionList tool. It sets up a simple application and describes how to create a file menu item with a file open action. Building the VCL application with ActionList actions consists of the following major steps:
| |
This procedure demonstrates how to construct a simple “Hello world” VCL Forms application using either Delphi or C++. Though simple, the Windows Forms "Hello world" application demonstrates the essential steps for creating a VCL Forms application. The application uses a VCL Form, a control, an event, and displays a dialog in response to a user action. Creating the "Hello world" application consists of the following steps:
| |
Using RAD Studio, the following procedure illustrates how to create actions using ActionManager. It sets up a simple user interface with a text area, as would be appropriate for a text editing application, and describes how to create a file menu item with a file open action. Building the VCL application with ActionManager actions consists of the following major steps:
| |
The following procedure describes how to build a dbExpress database application. Building a VCL Forms dbExpress application consists of the following major steps:
| |
This example creates a VCL Forms application that uses an XMLDocument component to display contents in an XML file. | |
Creating this VCL application consists of the following steps:
| |
Copying a string list can have the effect of appending to or overwriting an existing string list. This VCL application appends to a string list. With a simple change, it can overwrite a string list. Creating this VCL application consists of the following steps:
| |
Creating this VCL application consists of the following steps:
| |
A safe way to create a unique instance of a modal VCL form is to use a local variable in an event handler as a reference to a new instance. If you use a local variable, it doesn't matter whether the form is auto-created or not. The code in the event handler makes no reference to the global form variable. Using RAD Studio, the following procedure creates a modal form instance dynamically. It (optionally) removes the second form's invocation at startup. Building this VCL application consists of the following steps:
| |
Creating this VCL application consists of the following steps:
| |
Using RAD Studio, the following procedure creates a modal form at design time that is displayed later during program execution. Building this VCL application consists of the following steps:
| |
This procedure loads a bitmap image from a file and displays it to a VCL form.
| |
This procedure loads a bitmap image from a file and displays it in its entirety to a VCL form. The procedure uses the Height and Width properties of the Bitmap object to display a full view of the image.
| |
This procedure draws a polygon in a VCL form.
| |
This procedure draws a rectangle and ellipse in a VCL form.
| |
This procedure draws a rounded rectangle in a VCL form.
| |
This procedure draws two diagonal straight lines on an image in a VCL form.
| |
You may not want all your VCL application's forms in memory at once. To reduce the amount of memory required at load time, your application can create forms only when it needs to make them available for use. A dialog box, for example, needs to be in memory only during the time the user interacts with it. Using RAD Studio, the following procedure creates a modal form dynamically. The main difference between dynamically creating a form and displaying an auto-created VCL form is that you remove the second form's invocation at startup and write code to dynamically create the form.... more | |
A modless form is a window that is displayed until it is either obscured by another window or until it is closed or minimuzed by the user. Using RAD Studio, the following procedure creates a modeless form dynamically. Building this VCL application consists of the following steps:
| |
This VCL application first creates a list of strings. Then it iterates through the strings, changing all string characters to uppercase. It consists of the following steps:
| |
These are the essential steps to building a VCL Forms multithreaded application with a thread object using RAD Studio. | |
| |
Use these basic techniques to prevent other threads from accessing the same memory as your thread:
| |
| |
| |
| |
Using the main VCL thread consists of the following basic steps:
| |
The following are procedures that can be used to wait for threads.
| |
The Execute method is your thread function. You can think of it as a program that is launched by your application, except that it shares the same process space. Writing the thread function is a little trickier than writing a separate program, because you must make sure that you do not overwrite memory that is used by other processes in your application. On the other hand, because the thread shares the same process space with other threads, you can use the shared memory to communicate between threads. | |
This procedure adds a bitmap image to a combo box in a VCL forms application.
| |
Creating this VCL application consists of the following steps:
| |
Creating this VCL application consists of the following steps:
| |
Creating this VCL application consists of the following steps:
| |
Like a Delphi control, an ActiveX control generates program code when you place the component on a form or other logical container in the IDE. The main difference between an ActiveX control and a Delphi control is that an ActiveX control is language independent. You can create ActiveX controls for deployment to a variety of programming environments on Windows, not just Delphi or C++Builder. This procedure uses the VCL forms ActiveX wizard to create an ActiveX control. To test the control, you can install it on your machine as a VCL component in the IDE. To install the control, you... more | |
Like a Delphi control, an ActiveX control generates program code when you place the component on a form or other logical container in the IDE. The main difference between an ActiveX control and a Delphi control is that an ActiveX control is language independent. You can create ActiveX controls for deployment to a variety of programming environments on Windows, not just Delphi or C++Builder, for example. This procedure uses the VCL forms ActiveX Active Form wizard to create an Active Form containing two components. To test the control, you can deploy it to the Web. This procedure consists of the... more | |
Creating the Web browser application consists of the following steps:
| |
This procedure describes how to create an application that uses ribbon controls. The core ribbon functionality is derived from the TRibbon component. While the ribbon uses other components, none of the core components are registered on the tool palette. Components:
| |
This topic follows in sequence the creation of a ribbon application using either the Ribbon Application Wizard or the manual steps described in Creating an Application that Uses Ribbon Controls. This topic assumes that you are familiar with the TActionManager component and the components associated with its use. Numerous new properties have been added to help support the ribbon requirements. Many existing properties have no effect when modified on a command that is displayed on the ribbon. For instance:
|
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|