VCL.Printing Sample

From RAD Studio Code Examples
Jump to: navigation, search

Language:

This sample exemplifies how to create a small application that prints multipage documents.

Contents

Location

You can find the printing sample project at:

Description

This application consists of a five-page editor that has the ability to print documents.

The main form contains a printing button, a TTabSet, and a TMemo for entering the text. The text in the TMemo component changes for each of the five tabs. Clicking the Print button displays the standard Windows print dialog.

How to Use the Sample

  1. Navigate to Start > Programs > Embarcadero RAD Studio > Samples and open printing.cbproj
  2. Press F9 or choose Run > Run

Files

The project has one source file, mainform.cpp, which contains the class for the editor.

Classes

TFormMain is the class that implements the main form of the editor. It contains a print button, a TPrintDialog component, a TMemo, and a TTabSet with five tabs. TFormMAin handles the printing of the document and the text display for each of the five pages.

Implementation

Uses

See Also

Personal tools