VPE VCL

<< Click to Display Table of Contents >>

Navigation:  How To Use the VPE Control >

VPE VCL

Previous pageReturn to chapter overviewNext page

The common sequence of function calls is:

Set the properties for behavior and appearance of VPE in the design mode, or during runtime before calling OpenDoc

Open a virtual document with the method "OpenDoc

Use all possible methods to insert VPE objects (like Write(), etc.)

Use "PageBreak” to generate new pages

Use "Preview” to show the preview to the user, this is optional

Use "PrintDoc” to print the document, or WriteDoc() to export it

Close the document with " CloseDoc

 

It is only possible to open one document per VPE-VCL. If you want to open multiple documents simultaneously, you need to place the same number of VPE-VCL's on the form.

 

The following example assumes that you use a VPE-VCL object named "Report".

procedure TForm1.FormCreate(Sender: TObject);

begin

 Report.OpenDoc;

 Report.Print(1, 1, 'Hello World!');

 Report.Preview;

end;

 

This example is very simple. The document is opened, the text "Hello World!" is inserted at position (1, 1) and afterwards the preview is shown.

 

For a detailed explanation of the basic programming techniques, please continue reading in the "Programmer's Manual" chapter 4 "Programming Techniques".

 

If you are using the VPE Enterprise or Interactive Edition, there is also a very important note in the Programmer's Manual: Important Note for VPE-VCL Users!