Understanding the Data Types and Declarations (Visual Basic)

<< Click to Display Table of Contents >>

Navigation:  How To Use the VPE Control > VPE ActiveX >

Understanding the Data Types and Declarations (Visual Basic)

Previous pageReturn to chapter overviewNext page

Because the properties and methods of the VPE Control (for .NET, Java, PHP, Python, Ruby, ActiveX and Delphi / C++ Builder VCL) are nearly 100% the same, we explain the API of the VPE control for all the different programming languages within this single book. We use a meta-description to describe the data types, properties, methods and parameters of the VPE API.

Here is how the meta-description is converted to Visual Basic:

Throughout this manual, methods and parameters are always declared in the form <Data Type> <Name>, e.g. boolean AutoDelete would be declared in VB as Dim AutoDelete as Boolean.

The data type in square-brackets defines the data type for the ActiveX.

 

Example:

property PenStyle [integer] PenStyle

means that this property is of type "integer".
The leading "PenStyle" type declaration is for the .NET control only.

 

Data Types:

VpeCoord is Double

boolean is Boolean

integer is Integer

long is Long

string is String

Color is Color (in fact a 32-bit long integer)

Properties / Methods:

The keyword method declares a method, e.g. method void CloseProgressBar().

A method is either a Sub or a Function, depending on how the return type of the method is declared. The keyword immediately following the word method declares the method.

void is a Sub which does not return a value, e.g.
method void StorePos() is in Visual Basic: Sub StorePos()

all other declarations declare a function, e.g.
method boolean WriteDoc(string FileName) is in Visual Basic
Function WriteDoc(FileName as String) as Boolean

The keyword property describes a property. The line below the declaration of the property explains, how the property can be accessed (read-only, write-only or read / write together) and if it can be accessed during runtime only, or also during design time.

 

Example:

property boolean PageScrollerTracking

read / write; design- & runtime

means: the property is of type Boolean, its name is PageScrollerTracking and it can be accessed for read (you can read its value, e.g. n = PageScrollerTracking) and for write (you can assign it a value, e.g. PageScrollerTracking = True) and it is available during runtime (while your application is running) and design time (when you are developing your forms).

It would be declared in Visual Basic as Dim PageScrollerTracking as Boolean.