DLL vs ActiveX / VCL

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

DLL vs ActiveX / VCL

Previous pageReturn to chapter overview

This section is for users that are working with the DLL and want to use the ActiveX / VCL, or vice versa.

Instead of properties and methods the DLL offers a set of functions. The events are the same (notification messages sent via "SendMessage()").

The DLL functions all start with the prefix "Vpe" and require a document handle. Since the ActiveX and VCL use the syntax "<Object> . <Method>" the document handle is not required and the prefix "Vpe" is left out.

Example:

DLL:

VpeLine( hDoc, x, y, x2, y2 )

 

Control:

<Object>.Line( x, y, x2, y2 )

(Visual Basic has problems with the keywords "Print, Write, Line and Scale". VB doesn't recognize that these are methods and properties of an ActiveX. So we implemented them twice: in VB use "VpePrint, VpeWrite, VpeLine and VpeScale".)

All DLL functions, which just set or get a single value, are defined as properties in the ActiveX / VCL.

Example:

DLL:

VpeSetPenSize( hDoc, 10 )

 

Control:

<Object>.PenSize = 10

Example:

DLL:

ps = VpeGetPenSize( hDoc )

 

Control:

ps = <Object>.PenSize