Object Methods Reference Manual

Contents Hide


System Objects

Array

Examples

int

Append
(string,any)

Adds the object to the array specified. The object is added at the end of the array. Returns 0 if successful, otherwise the error code.

Parameters:

string - Name of the array
any - Object value to be append at the end of the array

int

AppendCVSString
(string,string, string)

Parses and adds comma separated values (i.e. a CSV string) to the named array . Returns 0 if successful, otherwise the error code.

Parameters:

string - Name of the array
string - CSV string containing comma separated values to be added to the array
string - CSV escape character. If not specified (i.e. empty or null), the double quotes character will be used

int

Clear
(string)

Removes all the elements from the array

Parameters:

string -  Name of the array to be cleared

int

Create
(string)

Creates a new array to be identified by the name specified. Returns 0 if successful, otherwise the error code.

Parameters:

string - Name of the newly created array

any

Get
(string,int)

Returns the object at the specified location. A null value will be returned if the index is out of range.

Parameters:

string - Name of the array
int - Index of the object be returned

int

InsertAt
(string, int, any)

Inserts the object at the specified location. Returns 0 if successful, otherwise the error code.

Parameters:

string - Name of the array
int - Index at which the object to be inserted
any - Object value to be inserted at the specified index

void

Remove
(string)

Clears the content of the array and removes it from the memory. After removal the array with the same name needs to be recreated if needed again.

Parameters:

string - Name of the array to be removed

int

RemoveAt
(string,int)

Removes the object at the specified location. Returns 0 if successful, otherwise the error code.

Parameters:
  1. string - Name of the array
    int - Index of the object to be removed

int

Set
(string,int,any)

Replaces the object at the specified location with a new one. Returns 0 if successful, otherwise the error code.

Parameters:

string - Name of the array
int - Index of the object be replaced
any - New object value to be placed at the index specified

int

Size
(string)

Returns the size of the array, i.e. number of elements in the array. Returns -1 if the array does not exist or if an error occurred.

Parameters:

string - Name of the array

string

ToCVSString
(string,string, boolean)

Converts the content of the named array to a comma separated values (CSV) string. Returns NULL on failure.

Parameters:

string - Name of the array
string - CSV escape character to be used. If not specified (i.e. empty or null), the double quotes character will be used
boolean - If this flag is set to true, then all the fields in the CSV output will be enclosed with the escape character specified. Otherwise, only the required fields will be enclosed by the escape character if necessary (i.e. if a field contains the escape character in its value).

Blob

Examples

int

AppendBlob
(string,int)

Appends a blob to the named blob. Returns 0 if successful, otherwise the error code.

Parameters:

string - Name of the binary blob object
int - Binary blob to be appended

int

AppendByte
(string,int)

Appends a byte to the named blob. Returns 0 if successful, otherwise the error code.

Parameters:

string - Name of the blob
int - Byte value to be appended

int

Create
(string)

Creates a new binary blob object to be identified by the name specified. Returns 0 if successful, otherwise the error code.

Parameters:

string - Name of the newly created binary blob object

base64Binary

GetBlob
(string)

Returns the named blob object as a base64Binary value. Returns a null object if any error occurs.

Parameters:

string - Name of the binary blob object

int

GetByte
(string,int)

Returns the byte value at the specified index of the named blob. Returns a null object if the index is invalid.

Parameters:

string - Name of the binary blob object
int - Index of the byte to be returned

int

Remove
(string)

Deletes the named blob from the memory. Returns 0 if successful, otherwise the error code.

Parameters:

string - Name of the blob to be deleted

void

RemoveAll
()

Deletes all the blob objects

 

int

SetBlob
(string,base64Binary)

Replaces the blob value with the binary blob value passed. Returns 0 if successful, otherwise the error code.

Parameters:

string - Name of the binary blob object
base64Binary - New blob content

int

SetByte
(string,int,int)

Sets the byte value at the specified index of the named blob. Returns 0 if successful, otherwise the error code.

Parameters:

string - Name of the binary blob object
int - Byte value to be set
int - Index of the byte

int

Size
(string)

Returns the size of the named blob object, i.e. the number of bytes in the byte stream owned by the blob. Returns -1 if the blob does not exist or if an error occurred.

Parameters:

string - Name of the binary blob object

Calendar

Examples

int

GetEventAvailability
()

Returns the event availability status. Use the System Calendar Availability constants to assess this value.

 

string

GetEventDescription
()

Returns the description of the event.

 

datetime

GetEventEnd
()

Returns the end time of the event.

 

string

GetEventId
()

Returns the event ID.

 

string

GetEventLocation
()

Returns the location of the event.

 

string

GetEventOrganiser
()

Returns the organiser of the event.

 

datetime

GetEventStart
()

Returns the start time of the event.

 

string

GetEventTitle
()

Returns the title of the event.

 

string

IsEventAllDay
()

Returns true if the event is an all day event, otherwise false.

 

boolean

NextEvent
()

Positions the cursor at the next event. Returns true if an event object is available, otherwise false.

 

void

QueryEvents
(dateTime, dateTime)

Queries the calendar events within the specified period from all calendars configured on the device. Events are returned in chronological order.

Parameters:

dateTime - Start of the query time window
dateTime - Finish of the query time window

void

QueryEventsInCalendar
(string, dateTime, dateTime)

Queries the calendar events within the specified period from the calendar specified. Events are returned in chronological order.

Parameters:

string - Calendar ID
dateTime - Start of the query time window
dateTime - Finish of the query time window

void

ResetEventValues
(datetime, dateTime)

Removes the event fields set so far.

Parameters:

dateTime - Quality of the images to be captured by the camera.

void

SetEventValue
(int, any)

Sets the event value.

Parameters:

int - Event field ID. Use the System Event Field constants.
any - Event field value.

string

CreateEvent
(string)

Creates a new event in the specified calendar using the event values populated. On success, returns the ID of the event created, null on error.

Parameters:

string - Calendar ID

int

DeleteEvent
(string,string)

Deletes an event from the specified calendar. Returns 0 on success, otherwise the error code.

Parameters:

string - Calendar ID
string - Event ID

int

UpdateEvent
(string,string)

Updates an event in the specified calendar. Returns 0 on success, otherwise the error code.

Parameters:

string - Calendar ID
string
- Event ID

string

GetCalendarDisplayName
()

Returns the display name of the calendar at the current cursor..

 

string

GetCalendarId
()

Returns the ID of the calendar at the current cursor..

 

string

GetCalendarName
()

Returns the name of the calendar at the current cursor..

 

boolean

NextCalendar
()

Positions the cursor at the next calendar. Returns true if a calendar object is available to query, otherwise false.

 

void

QueryCalendars
()

Queries the available calendars on the device.

 

Camera

Examples

int

CaptureImage
()

Captures an image using the built-in camera of the device. Returns 0 if the image is taken successfully, otherwise the error code.

 

int

CaptureVideo
()

Captures a video using the built-in camera of the device. Returns 0 if the video is taken successfully, otherwise the error code.

 

string

GetFileName
()

Returns the name of the image that has been captured, together with fully qualified file path.

 

Note:

If SetFileName is used, then this method will return the same name. Otherwise it will return the file name generated by the camera application.

string

ImportImage
()

Imports an image from the camera roll of the device. Returns 0 if the image is imported successfully, otherwise the error code.

 

Note:

Similar to CaptureImage(), the SetPath(), SetFile() and GetFileName() methods can be used in conjunction with this method.

string

ImportVideo
()

Imports a video from the camera roll of the device. Returns 0 if the video is imported successfully, otherwise the error code.

 

Note:

Similar to CaptureImage(), the SetPath(), SetFile() and GetFileName() methods can be used in conjunction with this method.

void

SetFileName
(string)

Sets the name of the image to be captured.

Parameters:

string - Name of the file where the image is to be stored.

Note:

If this method is not used, then GetFileName will return the file name generated by the camera application itself.

void

SetImageQuality
(int)

Sets the image quality.

Parameters:

int - Quality of the images to be captured by the camera.

void

SetPath
(string)

Sets the directory in which the captured images are to be stored.

Parameters:

string - Directory where the image files are saved

void

SetResolution
(int,int)

Sets the image height and width in pixels.

Parameters:

int - Image width in pixels
int - Image height in pixels

void

ViewVideo
(string)

View the video contained in the specified file.

Parameters:

string - Name of the file containing the video to be viewed.

Note: The Camera.SetPath() method can be used in conjunction with this method.

ConnectionManager

Examples

int

Connect
()

Connects to the server network. Returns 0 if successful, otherwise the error code.

 

int

ConnectUsing
(string)

Connects to the server network using the URL (or RAS entry name) specified. Returns 0 if successful, otherwise the error code.

Parameters:

string - Server URL or RAS entry name to be used

int

Disconnect
()

Disconnects BrightForms from the server network. Returns 0 if successful, otherwise the error code.

 

int

GetConnectionType
()

Returns the BrightForms connection type (i.e. network access, or access via Connections, or access via a RAS dialup). Use System 'Connection Manager' constants to check the returned value.

 

boolean

IsConnected
()

Checks if BrightForms is connected to the server network or not. Returns true if connected, otherwise false.

 

boolean

IsConnectionRequired
()

Checks if BrightForms needs to connect to the server network or just needs to using the existing network connection (e.g. if the user ticked 'Need To Connect Server Network' checkbox or not in Settings --> Dialup tab). Returns true if BrightForms needs to establish a connection to server network, otherwise false.

 

void

SetConnectionType
(int)

Sets the BrightForms connection type (i.e. network access, or access via Connections, or access via a RAS dialup). Use System 'Connection Manager' constants to set this value.

Parameters:

int - Connection type. Use System 'Connection Manager' constants to set this value.

Database

Examples

void

AddColumn
(string,any)

Adds a new column value to the temporary record

Parameters:

string - Column name
any - Column Value

int

AddRecord
(string)

Adds a new record to the table specified using the temporary record created

Parameters:

string - Name of the table

Note:

Use the AddColumn method to create the temporary record.

int

Compact ()

Compacts the database. This method will compact the database only if there is no connection to the database. Returns 0 if successful, otherwise the error code. .

 

int

DeleteRecords
(string)

Deletes the records identified by the query of which name is specified

Parameters:

string - Name of the query to be used to find the records to be deleted

Note:

Use the SetQueryParam method if the delete query requires a parameter.

int

DeleteRecordsLocally
(string)

Deletes the records locally identified by the query of which name is specified. This method is provided for house keeping purposes. Database engine will NOT create sync change info for the records deleted by this method.

Parameters:

string - Name of the query to be used to find the records to be deleted locally

Note:

Use the SetQueryParam method if the delete query requires a parameter.

int

ExecuteUpdate
(string)

Executes the SQL statement. IMPORTANT NOTE : The changes made by this method does not go though the database engine. The synchronisation engine will not see the changes made. Hence the changes will not be detected and sent to the server. Use DeleteRecords or UpdateRecords instead. This method is intended for advanced users. Also note that this method does not return a resultset. It returns 0 on success, otherwise the error code.

Parameters:

string - SQL statement to be executed.

int

ExportToDatabase
(string,string,string,boolean) - DEPRECATED

- Please use Method

Exports the data specified by the query to a table in the destination Access/PocketAccess database. The destination table must have the matching column names that are the output of the query. It will return 0 if the export is successful, otherwise an error code will be returned.

Parameters:

string - Name and location of the destination Access/PocketAccess database
string - Table name
string - Query name
boolean - if true, then delete the destination table content before exporting new records. Otherwise the records will not be deleted.

int

GetDatabaseEngine
()

Returns the database engine type

 

Note:

Use the values prefixed with DB_ from the system Constants of the Data Source Tree to compare the result and identify what the database engine type is.

any

GetLockedRecordColumn
(string) - DEPRECATED

- Please use Method

Returns the latest value of the column of the record locked by LockServerRecord method.

Parameters:

string - The name of the column

string

GetServerLockId
() - DEPRECATED

- Please use Method

Returns the lock id assigned by BrightServer after calling LockServerRecord method.

 

string

GetServerLockOwner
() - DEPRECATED

- Please use Method

Returns the name of the user who locked the record by using LockServerRecord method.

 

int

LockServerRecord
(string) - DEPRECATED

- Please use Method

Marks a record as locked in the table specified. A particular record is identified by the column name and value pairs set by calling AddColumn method before calling this method.

Parameters:

string - Name of the parameter to be set

Note:

This method is used with BrightServer Direct Access on a thin-client mode.

This method allows you to create a multiple user backend application with record locking.

Use with the other server locking methods especially ReleaseServerLock

int

ReleaseServerLock
(string) - DEPRECATED

- Please use Method

Releases the lock on a record created before by LockServerRecord method

Parameters:

string - Id of the lock to be released.

Note:

Use the LockServerRecord method first.

void

Reset
()

Resets the internal structures of the database object, and prepares it for the next operation

 

Note:

Always use this method before adding, updating or deleting records.

int

ResetTimestamp
(string)

Resets the timestamp for the table specified so that the client sync engine can synchronise everything again as if nothing has been synchronised before from server. Returns 0 if successful, otherwise the error code.

Parameters:

string - Table name

int

SetCompactionSettings
(boolean,boolean,boolean)

Updates the system database compaction settings. Returns 0 if successful, otherwise the error code..

Parameters:

boolean - true if the database is to be compacted on startup. Set this parameter to "false" to turn the database compaction off.

boolean - true if the database is to be compacted every time BrightForms starts, false to compact the database "once" on the next startup. This parameter is ignored if the compaction is turned off by setting the first parameter to false (i.e. when the compaction is turned off).

boolean - true if the user is to be prompted before the database compaction. For silent compaction, set this parameter to false.

int

SetQueryParam
(string,any)

Stores the query parameter value in the temporary area

Parameters:

string - Name of the parameter to be set
any - Parameter value

Note:

Use this method before applying the UpdateRecords or DeleteRecords method if the query requires a parameter.

int

UpdateRecords
(string)

Updates the records identified by the query of which name is specified

Parameters:

string - Name of the query to be used to find the records to be updated

Note:

Use the SetQueryParam method if the update query requires a parameter.

int

GetChangedRecordCountForQuery
(string)

This method returns the number of records that have been added or modified and are required to be sent to server using the query specified. The query MUST be a single query table, and it does not include the number of deleted records. Returns -1 on error.

Parameters:
  1. string - Name of the query to be used to search the number of synchronisable changed records

int

GetChangedRecordCountForTable
(string)

This method returns the number of records that have been added or modified and are required to be synchronised to server. It does not include the number of deleted records. Returns -1 on error.

Parameters:
  1. string - Name of the table to be used to search the number of synchronisable changed records.

int

GetDeletedRecordCountForTable
(string)

This method returns the number of records that have been deleted and are required to be synchronised to server for the specified table. Returns -1 on error.

Parameters:
  1. string - Name of the table to be used to return the number of deleted records

boolean

HasDataToSendServer
(string)

This method checks if the table specified has any added, modified or deleted records that must be sent to server. Returns true if there are any added, modified or deleted records (i.e. sync data) to be synchronised to server, otherwise false.

Parameters:
  1. string - Table name

int

BeginTransaction
()

Starts a new database transaction. Multiple database changes can be made within a transaction. You must call "commit" method if all changes are successful, otherwise call "rollback" method to undo all the changes. Returns 0 if a transaction is started successfully.

 

int

Commit
()

Makes all changes made since the previous BeginTransaction method call permanent and releases any database resources currently held by this object. This method should be used only after calling BeginTransaction and all the changes made are successful. Returns 0 if the transaction has been committed successfully.

 

int

Rollback
()

Undoes all changes made in the current transaction and releases any database resources currently held by this object. This method should be used only after calling BeginTransaction and if any of the changes made are unsuccessful. Returns 0 if the transaction has been rolled back successfully.

 

int

ImportFromFile
(string, string)

Imports the data stored in a CVS file into a table using the column order specified. Return 0 on success, otherwise the error code.

Parameters:
  1. string - Name and the CSV file to be imported
    string - Table to which the CSV file content will be imported

int

ExportToFile
(string, string)

Exports the table data specified by a query to a CVS file using the column order passed. Return 0 on success, otherwise the error code.

Parameters:
  1. string - Name and the CSV file to which the data will be exported
    string - Query that defines the records in the table

int

SynchroniseFromDropbox
(string, string, string)

Synchronises the table data from Dropbox. Before importing the data, the content of the local table will be deleted. Return 0 on success, otherwise the error code.

Parameters:
  1. string - Dropbox account access token
    string - The name of the table into which the Dropbox file in CSV format is to be imported
    string - The name of the Dropbox file that the table data will be stored in CSV format.

int

SynchroniseToDropbox
(string, string, string)

Synchronises the changed table records to Dropbox. Upon successful upload, local changes will be deleted. Return 0 on success, otherwise the error code.

Parameters:
  1. string - Dropbox account access token
    string - Query that defines the records in the table to be synchronised to Dropbox
    string - The name of the Dropbox file that the changed table records will be stored in CSV file format.

DateTime

Examples

dateTime

CreateDate
(int,int,int)

Creates a new datetime object of which time portion is set to midnight (00:00:00).

Parameters:

int - Year
int - Month
int - Day

dateTime

CreateTimestamp
(int,int,int,int,int,int)

Creates a new datetime object

Parameters:

int - Year
int - Month
int - Day
int - Hour
int - Minute
int - Second

string

Format
(dateTime,string)

Creates a string object based on the format passed from the datetime specified

Parameters:

dateTime - Datetime object to be formatted
string - Format string

Note:

Refer to the Appendix > Date-Time Formatting and Operations chapter for Date-Time formatting.

string

GetCurrentTimestampString
(string)

Returns the current datetime value as a string using the format passed.

Parameters:

string - Datetime format string

int

GetDay
(dateTime)

Returns the day of the month in the range 1 through 31

Parameters:

dateTime - Datetime value

int

GetDayOfWeek
(dateTime)

Returns the day of the week of the datetime value passed in the range of 1 through 7 (1=Sunday, 2=Monday,...)

Parameters:

dateTime - Datetime value

int

GetDayOfYear
(dateTime)

Returns the day of the year of the datetime value passed

Parameters:

dateTime - Datetime value

int

GetHour
(dateTime)

Returns the hour of the datetime value passed in the range of 0 through 23

Parameters:

dateTime - Datetime value

string

GetMillisecondsAsString
(dateTime)

Returns the number of milliseconds since January 1, 1970, 00:00:00.0 GMT as a string.

Parameters:

dateTime - Datetime value

int

GetMinute
(dateTime)

Returns the minute of the datetime value passed in the range of 0 through 59

Parameters:

dateTime - Datetime value

int

GetMonth
(dateTime)

Returns the month number in the range 1 through 12 (1=January)

Parameters:

dateTime - Datetime value

int

GetSecond
(dateTime)

Returns the second of the datetime value passed in the range of 0 through 59

Parameters:

dateTime - Datetime value

int

GetYear
(dateTime)

Returns the year of the datetime value passed

Parameters:

dateTime - Datetime value

dateTime

Now
()

Returns the current system date and time

 

dateTime

ResetTime
(dateTime)

Sets the time portion of the datetime object to midnight (00:00:00).

Parameters:

dateTime - Datetime object of which time portion is to be set to midnight (00:00:00).

dateTime

SetDate
(dateTime,int,int,int)

Sets the date portion of the datetime object

Parameters:

dateTime - Datetime object
int - Year
int - Month
int - Day

dateTime

SetTime
(dateTime,int,int,int)

Sets the time portion of the datetime object

Parameters:

dateTime - Datetime object
int - Hour
int - Minute
int - Second

int

GetUTCOffset
()

Returns the UTC time offset in seconds (i.e. the time difference in seconds between the local time and the UTC time). When converted to hours, this will indicate the current local time zone in relation to the UTC time zone.

Parameters:

 

dateTime

ToUTC
(dateTime)

Converts the local time passed to UTC (GMT) time.

Parameters:

dateTime - Local datetime object to be converted to UTC (GMT) time

 

Dropbox

Examples

int

Copy
(string, string, boolean)

Copies a file/folder in Dropbox to another file/folder in Dropbox. Returns 0 on success, otherwise the error code.

Parameters:

string - Source name
string - Destination name
boolean - Set to true to auto-rename. If there's a conflict, have the Dropbox server try to auto-rename the file to avoid the conflict.

int

Delete
(string)

Deletes a file/folder from Dropbox. Returns 0 on success, otherwise the error code.

Parameters:

string - Entity to be deleted

int

Download
(string,string)

Downloads the specified file from Dropbox. Returns 0 on success, otherwise the error code.

Parameters:

string - Dropbox file path and name
string - Local destination file name

boolean

FileExists
(string)

Checks if the specified file or folder exists on Dropbox. Returns true if exists, otherwise false.

Parameters:

string - File or folder name to be checked

string

GetDisplayName
()

Returns the display name of the Dropbox account connected to.

 

string

GetEmail
()

Returns the email address of the Dropbox account connected to.


string

GetId
()

Returns the id of the Dropbox account connected to.

 

string

GetName
()

Returns the user name of the Dropbox account connected to.


string

GetSurname
()

Returns the surname of the account connected to.

 

int

Initialise
(string)

Initialises the object by setting the Dropbox account access token. This method must be called first before using other methods. Returns 0 on success, otherwise the error code.

Parameters:

string - Dropbox access token

boolean

IsDisabled
()

Checks if the Dropbox account being used is disabled. Returns true if disabled, otherwise false.

 

int

Move
(string, string, boolean)

Moves a file/folder in Dropbox to another file/folder in Dropbox. Returns 0 on success, otherwise the error code.

Parameters:

string - Source name
string - Destination name
boolean - Set to true to auto-rename. If there's a conflict, have the Dropbox server try to auto-rename the file to avoid the conflict.

int

Upload
 (string, string, boolean)

Uploads the specified local file to Dropbox. Returns 0 on success, otherwise the error code.

Parameters:

string - Name of the local file that is to be uploaded to Dropbox
string - Destination Dropbox file name
boolean - If the destination file is to be overwritten. Set true to overwrite the destination file.

 

DLL

Examples

int

CallFn
(string)

Calls a function with no argument and no result code (e.g. "void function(void)"). It returns 0 if the function call was successful, otherwise the error code.

Parameters:

string - Name of the function to be invoked.

int

CallFnWithIntParam
(string,int)

Calls a function with a single integer argument and no result code (e.g. "void function(int)"). It returns 0 if the function call was successful, otherwise the error code.

Parameters:

string - Name of the function to be invoked.
int - Integer parameter value to be passed to the function.

int

CallFnWithIntParamResultCode
(string,int)

Calls a function with a single integer argument and an integer result code (e.g. "int function(int)"). Please use "GetFnResultCode" method to get the function result code. It returns 0 if the function call was successful, otherwise the error code.

Parameters:

string - Name of the function to be invoked.
int - Integer parameter value to be passed to the function.

int

CallFnWithPtrData
(string,any)

Calls a function with a single void* argument and no result code (e.g. "void function(void*)"). It returns 0 if the function call was successful, otherwise the error code.

Parameters:

string - Name of the function to be invoked.
any - The value of which address to be passed to the function. Note that only numeric or string objects are supported.

int

CallFnWithPtrDataResultCode
(string,any)

Calls a function with a single void* argument and an integer result code (e.g. "int function(void*)"). Please use "GetFnResultCode" method to get the function result code. It returns 0 if the function call was successful, otherwise the error code.

Parameters:

string - Name of the function to be invoked.
any - The value of which address to be passed to the function. Note that only numeric or string objects are supported.

int

CallFnWithResultCode
(string)

Calls a function with no argument and an integer result code (e.g. "int function(void)"). Please use "GetFnResultCode" method to get the function result code. It returns 0 if the function call was successful, otherwise the error code.

Parameters:

string - Name of the function to be invoked.

int

GetFnResultCode
()

Returns the result code of the latest function call that returns an result code.

 

int

Load
(string)

Loads the specified DLL module. It returns 0 if successful, otherwise the error code.

Parameters:

string - Name of the DLL to be loaded together with its path and the DLL file name.

int

Unload
()

Unloads the DLL loaded. It returns 0 if successful, otherwise the error code.

 

Email

Examples

void

AddAttachment
(string)

Adds a new file to the email to be sent.

Parameters:

string - Name of the file to be attached to the email

Note:

Call this method multiple times if the email has more than one file attachment

void

AddBcc
(string)

Adds a new recipient to bcc list

Parameters:

string - Recipient's email address

Note:

Call this method multiple times if the email has more than one Bcc email recipient

void

AddCc
(string)

Adds a new mail recipient to cc list

Parameters:

string - Recipient's email address

Note:

Call this method multiple times if the email has more than one Cc email recipient

void

AddTo
(string)

Adds a new recipient to direct (to) recipient list

Parameters:

string - Recipient's email address

Note:

Call this method multiple times if the email has more than one direct email recipient.

void

ClearAttachments
()

Clears (empties) the list of file attachments.

 

void

ClearBcc
()

Clears (empties) the list of BCC recipients.

 

void

ClearCc
()

Clears (empties) the list of CC recipients.

 

void

ClearTo
()

Clears (empties) the list of direct TO recipients.

 

void

Reset
()

Resets all the settings (clears the recipient lists, store name, sender address, etc.)

 

int

Send
(string,string)

Sends the email to the recipient(s) set. Returns 0 if the email is sent successfully, otherwise the error code.

Parameters:

string - Subject of the email
string - Email text (body)

Note:

Use AddTo, AddBcc, AddCc and AddAttachment first before using this method to specify the To, Cc, Bcc and attachment fields before sending the email.

void

SetAccountName
(string)

Sets the email account name to be used. Note that this is not the email address, but it is the name of the account. If this method is not used, then the default email account is assumed.

Parameters:

string - Name of the email store to be used when sending emails.

void

SetEnableSSL (boolean)

Enables or disables the SSL option when sending mails. By default the SSL option is turned off.

Parameters:

boolean - true to enable the SSL option, false to disable it.

Note:

By default the SSL option is set to false. Use this method to turn it on or off.

void

SetFromAddress (string)

Sets the mail address from which the email is sent.

Parameters:

string - Mail address of the sender.

void

SetFromName (string)

Sets the personal name alias for the from mail address. This will appear as the sender of the email when received.

Parameters:

string - Name alias

void

SetHost (string)

Sets the SMTP email server address.

Parameters:

string - SMTP server address

void

SetPort (int)

Sets the SMTP port number. This call is optional. If not called, then the default SMTP port number (25) will be used.

Parameters:

int - SMTP server port number.

void

SetProperty (string, string)

Sets the named mail object property value.

Parameters:

string - Mail property name

string - Mail property value as string

Note:

This is a reserved method to set mail object properties as recommended by the support team.

void

SetProtocol (string)

Sets the mail protocol type to be used.

Parameters:

string - Mail protocol name other than the default "smtp" protocol being used.

Note:

By default the "smtp" protocol is used. The valid options are "smtp", "pop3" or "imap". An incorrect option will be ignored by this method.

void

SetUserCredentials (string, string)

Sets the username and password credentials for outgoing mail server authentication.

Parameters:

string - Outgoing mail server user name

string - Outgoing mail server user password.

 

File

Examples

boolean

CopyFile
(string,string)

Copies the source file to the destination file specified. Returns true if the function is executed successfully. If the destination file already exists, then it will be overwritten.

Parameters:

string - Name of the source file
string - Name of the new destination file

int

CreateDirectory
(string)

Creates a new directory. Returns 0 if successful, otherwise the error code.

Parameters:

string - String that specifies the path of the directory to be created

boolean

DeleteFile
(string)

Deletes the file specified. Returns true if the file has been successfully deleted, otherwise false.

Parameters:

string - Name of the file to be deleted

boolean

FileExists
(string)

Checks if the specified file exists. Returns true if the file exists, otherwise false.

Parameters:

string - Name of the file

int

GetFileSize
(string)

Returns the size of the specified file in bytes, or -1 on error.

Parameters:

string - Name of the file to be checked

base64Binary

LoadBinary
(string)

Loads the binary file specified into a binary (blob) object and returns the contents of the file

Parameters:

string - Name of the binary file to be loaded.

string

LoadText
(string)

Loads the text file specified into a string object and returns the contents of the file

Parameters:

string - Name of the text file to be loaded.

int

RemoveDirectory
(string)

Deletes an existing empty directory. Returns 0 if successful, otherwise the error code.

Parameters:

string - String that specifies the path of the directory to be removed

boolean

RenameFile
(string,string)

Renames (moves) the file specified. Using this function files can be moved from one location to other. Returns true if the file has been successfully renamed, otherwise false.

Parameters:

string - Name of the file to be renamed
string - New name of the file

int

SaveBinary
(string,base64Binary)

Saves the binary (blob) object to the file specified. Returns 0 if the function is successful.

Parameters:

string - Name of the file into which the binary data is to be saved
base64Binary - Binary (blob) to be saved

int

SaveText
(string,string)

Saves the string object to the file specified. Returns 0 if the function is successful.

Parameters:

string - Name of the file into which the string is to be saved
string - String (text) to be saved

int

FindFirst
(string)

Searches a directory for a file or subdirectory whose name matches the specified file name. Returns 0 if successful, otherwise an error code.

Parameters:

string - A valid directory or path and file name, which can contain wildcard characters, such as * and ?.

boolean

FindNext
()

Continues a file search from a previous call to the FindFirst. Returns true if successful, otherwise false to indicate no more files or subdirectories to process.

 

dateTime

GetFindFileModifiedTime
()

Returns the time that the file was last written to. A null value is returned to indicate an error condition or no file is found yet.

 

string

GetFindFileName
()

Returns the name of the file or subdirectory found. A null value is returned to indicate an error condition or no file is found yet.

 

boolean

IsDirectoryFound
()

Checks if what was last found is a directory. Returns true if it is a directory, otherwise false.

 

boolean

IsFileFound
()

Checks if what was last found is a file. Returns true if it is a file, otherwise false.

 

 

FileHandler

Examples

void

Close
(string)

Closes the file identified by its file id.

Parameters:

string - Id of the file to be closed

int

GetReadResult
(string)

Returns the result of the last read operation. Return value of 0 indicates success, otherwise the error code of the last read is returned.

Parameters:

string - File id

string

OpenReader
(string)

Opens the specified file in the 'read' mode. Returns a 'file id' on success, otherwise a NULL value on failure.

Parameters:

string - Name of the file to be opened

string

OpenWriter
(string)

Opens the specified file in the 'write' mode specified. Returns a 'file id' on success, otherwise a NULL value on failure.

Parameters:

string - Name of the file to be opened

string

Read
(string)

Reads and returns the specified number of characters from the file. A NULL will be returned if there is nothing further to read, or an error occurred during read. Use 'GetReadResult' method to check if an error occurred during the read.

Parameters:

string - File id
int - Number of characters to be read

string

ReadLine
(string)

Reads and returns a line from the file. It reads the file until a file line terminator character is read. A NULL will be returned if there is nothing further to read, or an error occurred during read. Use 'GetReadResult' method to check if an error occurred during the read.

Parameters:

string - File id

int

Write
(string, string)

Writes the string to file. Return 0 on success, otherwise the error code.

Parameters:

string - File id
string -
String to be written to the file

int

WriteLine
(string,string)

Writes the string to file and writes the file line separator afterwards. Return 0 on success, otherwise the error code..

Parameters:

string - Name of the file to be renamed
string - New name of the file

 

Form

Examples

void

Close
()

Closes the form.

 

void

DisableTimer
()

Stops the form timer and disables it. The timer will NOT execute the action specified anymore.

 

Note:

Use together with EnableTimer and the Timer Interval form property to create a timer function on the form.

void

EnableTimer
()

Enables the form timer and re-starts it. The timer will execute the action after the timer interval specified elapses.

 

Note:

Use together with DisableTimer and the Timer Interval form property to create a timer function on the form.

string

GetFilePath
()

Returns the current file path

 

Note:

If it returns an empty file path, that means that it is in the default root directory i.e. Desktop (Win32) or My Documents (WinCE) used by the open and save file dialogs.

int

GetGesture
()

Returns the code of the last gesture performed by the user. Use the "Gesture" constants to check the result. Note that gestures may not be supported by all platforms.

 

int

GetTabNumber
()

Returns the current tab number. Note that tab numbers start from 0 (i.e. the first tab is 0, the second tab is 1 etc.)

 

void

HideBusyHourGlass
()

Hides the busy mouse cursor, and displays the normal mouse pointer

 

boolean

IsDirty
()

Checks if the value of any control on the form has been modified by the user since the form has been loaded, or since the Form's ResetDirty or the controls' ResetDirty methods have been called.

 

Note:
This method will return the form's dirty state regardless whether the form is a cursor form or not.

int

MessageBox
(string,string,int)

Displays a message box. See documentation for more details.

Parameters:

string - Message box caption (title)
string - Message text
int - Message box type. See documentation for more details.

Note:

The Message box types are derived from the system Constants Data Source Tree, use values prefixed with MB_.

Use values prefixed with ID_ from the system Constants Data Source Tree to compare the corresponding result from the message box.

void

SetBrightness
(int)

Changes the form's screen brightness.

Parameters:

int - Specifies the brightness as a percentage from 1 to 100.  100 = full brightness.  A value of less than 0, reverts to use the user-preferred screen brightness

Note:
This method sets the brightness of the current form only

void

SetFilePath
(string)

Sets the file path to be used by FileOpen and FileSave dialogs

Parameters:

string - File path to be used by FileOpen and FileSave dialogs

void

SetHelpText
(string)

Sets the form's help text displayed in the Help dialog.

Parameters:

string - New user help text that will be displayed in the form's Help dialog.

void

SetTimerInterval
(int)

Sets the form's timer interval

Parameters:

int - New timer interval in milliseconds.

void

ShowBusyHourGlass
()

Displays the busy mouse pointer

 

string

ShowFileOpenDialog
()

Displays a file dialog where the user can select the file to be opened. It returns the file name as a string. If the selection is cancelled or no file has been selected, it returns an empty string.

 

Note:

Use this method to obtain a file name before using the File object methods.

string

ShowFileSaveDialog
()

Displays a file dialog where the user can select the file to be saved. It returns the file name as a string. If the selection is cancelled or no file has been selected, it returns an empty string.

 

Note:

Use this method to obtain a file name to save to before using the File object methods.

void

ShowHelpDialog
()

Displays the form's help dialog.

  1.  

void

ShowSettingsDialog
()

Displays the system's settings dialog.

int

ShowSyncDialog
(boolean)

Displays the system's sync progress dialog and starts the synchronisation automatically. The return value is the result of the synchronisation.

Parameters:

boolean - If true, a small dialog is displayed and as soon as the synchronisation is finished the dialog is closed automatically. If false a full dialog is displayed. The dialog contains a list control that displays all the sync related messages as they occur. The user needs to close the dialog.

Note:

Use this method to start synchronisation after enabling all required sync rules. Refer to the Synchroniser methods to enable sync rules.

void

ShowTab
(int)

Displays the tab of which number is specified. Tab numbers start from 0 (i.e. the first tab is 0, the second tab is 1 etc.)

Parameters:

int - Tab number. Specifies the zero-based index of the tab to be selected

void

ViewDocument
(string)

View the document contained in the specified file.

Parameters:

string - File path for the document to be viewed

Note:
This method will attempt to recognise the document type and then display its content.

string

GetCurrentAspect
()

Returns the name of the current form aspect.

any

GetChildFormVariable
(string)

Returns the value of the child form variable specified. This method can only be used in post-close expressions.

Parameters:

string - Name of the child form variable of which value is to be returned

int

OpenChildForm
(string)

Opens the child form specified

Parameters:

string - Name of the form to be opened

Note:

Use the ResetChildData method first before opening the child form.

void

ResetChildData
()

Clears the buffers that contain the values to be passed to the child form.

 

Note:

This method should be used before opening the child form.

void

SetChildFormQueryParameter
(string,any)

Sets the specified child form query parameter value. The value is stored into an internal buffer.

Parameters:

string - Name of the form query parameter
any - Value of the form query parameter

Note:

Ensure that all required child form query parameters are set before opening the child form.

void

SetChildFormVariable
(string,any)

Sets the specified child form variable. The value is stored into an internal buffer.

Parameters:

string - Name of the variable
any - Value of the variable

Note:

Ensure that all required child form variables are set before opening the child form.

void

SetBackgroundColor
(int,int,int)

Changes the background color of the form

Parameters:

int - Specifies the intensity of the red color
int - Specifies the intensity of the green color
int - Specifies the intensity of the blue color

void

SetTextColor
(int,int,int)

Changes the form's tab text color.

Parameters:

int - Specifies the intensity of the red color
int - Specifies the intensity of the green color
int - Specifies the intensity of the blue color

int

DeleteRecord
()

Deletes the record attached to the form. Returns 0 if successful otherwise the error code.

 

Note:

This method will only work if there is a query binded to the form.

void

EnableConfirmSaveMessage
(boolean)

Enables or disables the message to be displayed when the form is about to be closed or another record is to be displayed, and the current record has not been saved yet.

Parameters:

boolean - True if the save confirmation dialog is to be displayed (which is the case by default), otherwise false to ignore the user changes with no user prompt.

int

GetCurrentRecordPosition
()

Returns the current record index (i.e. the record position in the cursor form data cache). This method functions only if the form is a cursor form.

 

int

GetRecordCount
()

Returns the number of records the cursor form has. This method functions only if the form is a cursor form.

 

boolean

IsFirstRecord
()

Checks if the cursor form is displaying the first record. This method functions only if the form is a cursor form.

 

boolean

IsFormDataChanged
()

Checks if the form data has been changed by the user (i.e. if the form data is dirty). Returns true if the form data (the current record) has been modified by the user, otherwise false.

 

boolean

IsFormDataLoaded
()

Checks if the form data has been loaded successfully or not. Returns true if the form data has been loaded successfully, otherwise false.

 

boolean

IsLastRecord
()

Checks if the cursor form is displaying the last record. This method functions only if the form is a cursor form.

 

Note:

This method is useful as a condition if it is the last record before executing another expression i.e. validation or saving

int

Jump
()

Jumps to another record in the cursor form. The record primary key values are specified by SetJumpColumn method. Returns 0 if the specified record is found, otherwise the error code.

 

Note:

Use SetJumpColumn first to specify the primary key values before using the Jump method.

void

MoveFirst
()

Navigates to the first record and displays it. This method functions only if the form is a cursor form.

 

void

MoveLast
()

Navigates to the last record and displays it. This method functions only if the form is a cursor form.

 

void

MoveNext
()

Navigates to the next record and displays it. This method functions only if the form is a cursor form.

 

void

MovePrevious
()

Navigates to the previous record and displays it. This method functions only if the form is a cursor form.

 

void

New
()

Prepares the form for creating a new record. It also calls the expression specified for the form's Action-New. It is as if the user clicked on the cursor bar's 'New' button.

 

void

Refresh
()

Re-executes the form query and re-loads the form data.

 

Note:

Use the Jump and SetJumpColumn methods after a form refresh to make sure that the cursor position is still on the current record displayed before the refresh.

int

SaveRecord
()

Saves the current form data. Returns 0 if successful otherwise the error code.

 

Note:

This method will only work if there is a query binded to the form.

This is a useful method to call before opening a child form.

void

SetConfirmSaveMessage
(string)

Sets the message to be displayed when the form is about to be closed or another record is to be displayed, and the current record has not been saved yet.

Parameters:

string - The user message for the save confirmation dialog

Note:

This should be used on a form Open event to ensure that the Confirm Save message has been set before loading any of the records.

The Confirm Save message will only be displayed if the form has a query attached to it and allows record saving.

void

SetJumpColumn
(string,any)

Sets the primary key column values of the record to be jumped by using Jump method. Call this method multiple times if the form data has more than one primary key column defined.

Parameters:

string - Name of the primary key column
any - Value of the primary key column

void

ShowRecordPosition
(boolean)

Cursor forms by default display the current record index and the total number of records loaded on the form's title bar. Set this flag to false if you do not want to display record position on the title bar.

Parameters:

boolean - If false the current record index and the total record count will not be shown on the form's title bar, otherwise it is displayed by default.

int

EnableMenuItemByIndex
(int,int,boolean)

Enables or disables a menu item by its index. All of the menu items that can execute an expression or open another form has a unique index assigned to it. The menu item index starts from 0, and advances from top to bottom, left to right. To disable submenu items, this method should be used.

Parameters:

int - User menu id. User menus are ones that are defined for the form by the user, and are displayed next to the system "Help" menu. Ids of the user menus start with 0. The first menu id is 0, the second id is 1, etc.
int - Menu item index. This is the menu item index that is unqiue amongst all the users menus.
boolean - True enables the menu item, False disables it.

int

EnableMenuItemByPosition
(int,int,boolean)

Enables or disables a menu item by its position. The position of the top most item is 0.

Parameters:

int - User menu id. User menus are ones that are defined for the form by the user, and are displayed next to the system "Help" menu. Ids of the user menus start with 0. The first menu is 0, the second menu id is 1, etc.
int - Menu item position . The top most menu item has the position 0, the next item down has 1, etc
boolean - True enables the menu item, False disables it.

GPS

Examples

double

CalculateDistance
(double,double,double,double)

Calculates the distance between two GPS coordinates and returns it in "meters".

Parameters:
  1. double - Latitude of the first GPS coordinate
    double - Longitude of the first GPS coordinate
    double - Latitude of the second GPS coordinate
    double - Longitude of the second GPS coordinate

int

Close
()

Closes the COM port that the GPS device is attached. It returns 0 if successful, otherwise the error code.

double

GetAltitude
()

Returns the current altitude in metres above mean sea level

 

int

GetFixQuality
()

Returns current fix quality where 0 = Invalid, 1 = GPS fix (SPS), and 2 = DGPS fix.

 

datetime

GetGpsTime
()

Returns the GPS clock as "local" datetime. It will return a "null" value if no valid reading is available.

 

string

GetLatitude
()

Returns current latitude as a string, for example as "4916.46,N" where the latitude is 49 degrees 16.46 minutes NORTH

 

double

GetLatitudeAsDouble
()

Returns current latitude in degrees. Postive values indicate NORTH.

 

string

GetLongitude
()

Returns current longitude as a string, for example as "12311.12, W" where the longitude is 123 degrees 11.12 minutes WEST

 

string

GetLongitudeAsDouble
()

Returns current longitude in degrees. Positive values indicate EAST.

 

int

GetSatellitesInView
()

Returns the number of satellites in view

 

double

GetSpeed
()

Returns the current ground speed in Kilometres Per Hour

 

double

GetTrackAngle
()

Returns the current track angle in degrees True

 

boolean

HasValidRead
()

Returns true if there was a valid read from the GPS device, otherwise false

 

int

Open
(string,int,int,int,int,int)

Opens the COM port that the GPS device is attached. It returns 0 if successful, otherwise the error code.

Parameters:

string - Name of the COM port. For instance "COM1:". Please make sure a colon(:) is appended to the port name.
int - Baud rate (for instance 4800, 9600 etc.)
int - Bits in bytes to be transmitted (usually 8 or 7).
int - Parity. Use the serial port system constants for this parameter.
int - Number of stop bits. Use the serial port system constants for this parameter.
int - Handshake type (off, hardware, software). Use the serial port system constants for this parameter.

int

OpenIntermediate
()

Opens the default native GPS port using Microsoft intermediate GPS driver, and accesses the GPS data via the native Windows GPS API. It returns 0 if successful, otherwise the error code.

 

void

Reset
()

Invalidates the previous read and clears the previously cached GPS data.

 

int

SendMessage
(string)

Sends a message to the GPS device via the COM port. It returns 0 if successful, otherwise the error code.

Parameters:

string - Message string to be sent

Intermec

DEPRECATED - Please use Scanner Object

Examples

int

CloseScanner
()

Closes the scanner. Returns 0 on success, otherwise the error code.

 

string

GetBarcode
()

Reads the barcode from the scanner when the scan is complete. It returns an empty string if a successful scan has not occurred yet.

 

int

GetBarcodeType
()

Returns the type of barcode label read.

 

int

GetScanResult
()

This method returns the result of the most recent scan.

 

Note:

If the last scan was successful, this method will return 0, otherwise the error code.

int

OpenScanner
()

Opens the scanner device for reading barcode labels. Returns 0 on success, otherwise the error code.

 

int

Scan
()

This method initiates a soft scan. Returns 0 on success, otherwise the error code.

 

Note:

This method can be called when a user clicks on a button, or an entry field is focused etc.

int

SetScannerName
()

This method sets the name of the scanner to be used.

 

Note:

This method is not needed if the default scanner is used.

MagneticStripeCard

Examples

int

Close
()

Closes the COM port that the magnetic stripe card is attached. It returns 0 if successful, otherwise the error code.

 

string

GetCardNumber
()

Returns the credit card number

 

string

GetExpiryDate
(string)

Returns the expiry date given the format

Parameters:

string - Format string where by month and year expiry date is to be converted to string and returned

int

GetExpiryMonth
()

Returns the month number on which the card expires

 

int

GetExpiryYear
()

Returns the year on which the card expires

 

string

GetHolderName
()

Returns the name of the card holder

 

string

GetIssuerData
()

Returns the data from the issuer section from Track 1

 

string

GetTrack1
()

Returns the whole Track 1 data read from the magnetic stripe card

 

string

GetTrack2
()

Returns the whole Track 2 data read from the magnetic stripe card

 

boolean

HasValidRead
()

Returns true if there was a valid read from the magnetic stripe card, otherwise false

 

int

Open
(string,int,int,int,int,int)

Opens the COM port that the magnetic stripe card is attached. It returns 0 if successful, otherwise the error code.

Parameters:

string - Name of the COM port. For instance "COM1:". Please make sure a colon(:) is appended to the port name.
int - Baud rate (for instance 4800, 9600 etc.)
int - Bits in bytes to be transmitted (usually 8 or 7).
int - Parity. Use the serial port system constants for this parameter.
int - Number of stop bits. Use the serial port system constants for this parameter.
int - Handshake type (off, hardware, software). Use the serial port system constants for this parameter.

void

Reset
()

Invalidates the previous read and clears the cached card data read previously.

 

Map

Examples

void

Clear
(string)

Removes all of the key-value pairs from the map.

Parameters:

    string - Name of the map to be cleared

boolean

Contains
(string,string)

Checks if the specified key exists in the map. Returns true if the key is in the map, otherwise false.

Parameters:

    string - Name of the map
    string - Key to be checked

int

CreateMap
(string)

Creates a new map to be identified by the name specified. Returns 0 if successful, otherwise the error code.

Parameters:

    string - Name of the map to be created

any

Get
(string,string)

Returns the value for the key. A null value will be returned if the key does not exist in the map.

Parameters:

    string - Name of the map
    string - Key

int

Put
(string,string,any)

Inserts an object at the specified key. If the key is already in the map, then its value will be replaced. Returns 0 if successful, otherwise the error code.

Parameters:

    string - Name of the map
    string - Key name
    any - Object value to be inserted at the specified key

int

Remove
(string,string)

Removes the object identified by the key. Returns 0 if successful, otherwise the error code.

Parameters:

    string - Name of the map
    string - Key to be removed

void

RemoveMap
(string)

Clears the content of the map and removes it from the memory. After removal, the map with the same name needs to be recreated if needed again.

Parameters:

    string - Name of the map to be removed

int

Size
(string)

Returns the size of the map, i.e. the number of key-value pairs in the map. Returns -1 if the map does not exist or if an error occurred.

Parameters:

    string - Name of the map

Math

double

Abs
(any)

Returns the absolute value of the value passed

Parameters:
  1. any - Numeric value

double

Acos
(double)

Calculates the arccosine

Parameters:
  1. double - Value between -1 and 1 whose arccosine is to be calculated

double

Asin
(double)

Calculates the arcsine

Parameters:
  1. double - Value whose arcsine is to be calculated

double

Atan
(double)

Calculates the arctangent of the values passed in the range of -PI/2 to PI/2 radians. If the value passed is 0, then it returns 0.

Parameters:
  1. double - Value whose arctangent is to be calculated

double

Atan2
(double,double)

Calculates the arctangent of value1/value2 in the range -PI to PI radians. If both parameters are 0, the function returns 0.

Parameters:
  1. double - Value 1
    double - Value 2

int

Ceiling
(any)

Returns the next highest integer that is greater than or equal to the specified numeric value

Parameters:
  1. any - Numeric value

double

Cos
(double)

Calculate the cosine of the angle passed. The angle parameter is in radians.

Parameters:
  1. double - Angle in radians

double

Cosh
(double)

Calculate the hyperbolic cosine of the angle passed. The angle parameter is in radians.

Parameters:
  1. double - Angle in radians

int

Floor
(any)

Returns the nearest integer that is less than or equal to the specified numeric value

Parameters:
  1. any - Numeric value

double

Log
(double)

Calculates logarithms of the value passed

Parameters:
  1. double - Value whose logarithm is to be found

double

Log10
(double)

Calculates the base-10 logarithms of the value passed

Parameters:
  1. double - Value whose base-10 logarithm is to be found

double

Max
(any,any)

Returns the larger of the values passed

Parameters:
  1. any - Value 1
    any - Value 2

double

Min
(any,any)

Returns the smaller of the values passed

Parameters:
  1. any - Value 1
    any - Value 2

any

Mod
(any,any)

Divides one numeric value by another numeric value and returns the remainder

Parameters:
  1. any - Numeric value
    any - Numeric value

double

Power
(any,any)

Calculates value1 raised to the power of value2

Parameters:
  1. any - Value 1
    any - Value 2

int

Random
()

Generates a pseudorandom integer number

  1.  

int

Round
(any)

Returns a supplied numeric value rounded to the nearest integer

Parameters:
  1. any - Numeric value

int

Sign
(double)

Returns the sign function of a value. Returns zero if it is zero, 1 if it is greater than zero, or -1 if it is less than zero.

Parameters:

double - Value

double

Sin
(double)

Calculate the sines of the angle passed. The angle parameter is in radians.

Parameters:
  1. double - Angle in radians

double

Sinh
(double)

Calculate the hyperbolic sines of the angle passed. The angle parameter is in radians.

Parameters:
  1. double - Angle in radians

double

Sqrt
(double)

Calculates the square root of the value passed.

Parameters:
  1. double - Non-negative double value

double

Tan
(double)

Calculate the tangent of the angle passed. The angle parameter is in radians.

Parameters:
  1. double - Angle in radians

double

Tanh
(double)

Calculate the hyperbolic tangent of the angle passed. The angle parameter is in radians.

Parameters:
  1. double - Angle in radians

double

ToDegrees
(double)

Converts an angle measured in radians to an angle measured in degrees.

Parameters:
  1. double - Angle in radians

double

ToRadians
(double)

Converts an angle measured in degrees to an angle measured in radians

Parameters:
  1. double - Angle in degrees

NFC

Examples

int

Disable
()

Disables the NFC object. Returns 0 on success otherwise the error code.

 

int

Enable
()

Enables the NFC object to access tags. Returns 0 on success otherwise the error code.

Note:

This method must be called first to access a tag for reading or writing.

int

GetEventType
()

Returns the type of the NFC event which has just been triggered.

Note:

Use System NFC Event Type constants to check the event type returned. This method should normally be used in the expression that is run by the form's NFC action event.

int

GetLastError
()

Returns the result of the last operation carried out, such as a write operation.

Note:

This method should normally be used in the expression that is run by the form's NFC action event.

string

ReadString
()

Reads the NDEF formatted tag, and returns the tag data as a string value. Returns NULL on error.

Note:

The tag data will be read from the first record of the first message stored in the tag.

int

WriteAsText
(string)

Writes a string to the NDEF formatted NFC tag as a Text type. Returns 0 on success, otherwise the error code.

Parameters:

string - New string data to be stored in the tag as a URI type.

Note:

The new tag data will be stored in the first record of the first message.

int

WriteAsURI
(string)

Writes a string to the NDEF formatted NFC tag as a URI type. Returns 0 on success, otherwise the error code.

Parameters:

string - New string data to be stored in the tag as a URI type.

Note:

The new tag data will be stored in the first record of the first message.

Number

Examples

int

BitAND
(any,any)

Returns the result of a bitwise AND operation performed on two numeric values

Parameters:

any - Numeric value
any - Numeric value

int

BitOR
(any,any)

Returns the result of a bitwise inclusive OR operation performed on two numeric values

Parameters:

any - Numeric value
any - Numeric value

int

BitXOR
(any,any)

Returns the result of a bitwise exclusive OR operation performed on two numeric values

Parameters:

any - Numeric value
any - Numeric value

int

Ceiling
(any)

Returns the next highest integer that is greater than or equal to the specified numeric value

Parameters:

any - Numeric value

int

Floor
(any)

Returns the nearest integer that is less than or equal to the specified numeric value

Parameters:

any - Numeric value

int

GetHighByte
(int)

Returns the high byte of the integer passed

Parameters:

int - Integer value

int

GetLowByte
(int)

Returns the low byte of the integer passed

Parameters:

int - Integer value

boolean

IsDouble
(any)

Checks if the object is a double. If a string is passed, it will be checked to see if it is a valid double string.

Parameters:

any - Object to checked

Note:

This method is useful when validating double input values.

boolean

IsInteger
(any)

Checks if the object is an integer. If a string is passed, it will be checked to see if it is a valid integer string.

Parameters:

any - Object to checked

Note:

This method is useful when validating integer input values.

int

MakeInt
(int,int)

Creates an integer by combining the high and low byte values passed

Parameters:

int - Hight byte
int - Low byte

any

Mod
(any,any)

Divides one numeric value by another numeric value and returns the remainder

Parameters:

any - Numeric value
any - Numeric value

int

Random
()

Generates a pseudorandom integer number

 

int

Round
(any)

Returns a supplied numeric value rounded to the nearest integer

Parameters:

any - Numeric value

int

ShiftLeft
(int,int)

Shifts the bits in the integer value to left

Parameters:

int - Value to be shifted bitwise to left
int - Number of times the value to be shifted to left

int

ShiftRight
(int,int)

Shifts the bits in the integer value to right

Parameters:

int - Value to be shifted bitwise to right
int - Number of times the value to be shifted to right

boolean

ToBoolean
(any)

Converts the value passed to boolean (true/false). If the value is 0, then it is converted to false, otherwise to true

Parameters:

any - Input value to be converted to boolean (true/false)

double

ToDouble
(any)

Converts the value passed to double

Parameters:

any - Input value to be converted to double

int

ToInteger
(any)

Converts the value passed to integer

Parameters:

any - Input value to be converted to integer

Note:

Use this method to convert values to integer after a mathematical operation such as addition.

NumberGenerator

Examples

string

GetGUID
()

Creates a 16 byte Globally Unique Identifier (GUID) number and returns it as a string containing 36 characters in total in the following format including dashes : "00112233-4455-6677-8899-AABBCCDDEEFF". Returns null if the method fails.

 

Note:

Use this method to create unique GUIDs. This method is available only Windows platform.

int

GetMillisecondsSinceMidnight
()

Returns the number of milliseconds since the midnight

 

int

GetUniqueNumber
()

Returns an unique integer based on the system time

 

Note:

Use this method to create unique ids for the database records.

Query

Examples

any

GetColumnValue
(string)

Returns the value of the column specified.

Parameters:

string - Column name

Note:

Use the SetQuery or SetSql methods to establish a query or sql statement before using this method.

void

GoToNext
()

Navigates to the next record.

 

boolean

HasRecord
()

Call this method as you scroll from record to record to learn whether you have more records in the recordset to process. Returns true if there are more records to process; otherwise if you are after the last record, it returns false.

 

Note:

Use this method as a WHILE loop condition to iterate through the resultset.

int

SetQuery
(string)

Sets the name of the query to be executed. On success it returns 0, otherwise the error code.

Parameters:

string - Name of the query to be executed

int

SetQueryParam
(string,any)

Sets the query parameter value in the query selected. Make sure the query name is set before using this method. On success it returns 0, otherwise the error code.

Parameters:

string - Name of the parameter to be set
any - Parameter value

void

SetSql
(string)

Sets the SQL statement to be executed.

Parameters:

string - SQL SELECT statement to be executed

Report

Examples

any

AssignIf
(any,string,any,any,any)

Compares the first value to the second value using the comparison operator. If the result evaluates to true, then it returns the first result value, otherwise the second result value is returned.

Parameters:

any - First value to be compared (Left hand side of the comparison)
string - Comparison operator. Valid values are "lt", "<", "le", "<=", "=<", "gt", ">", "ge", ">=", "=>", "eq", "=", '==", "ne", "<>", "!=".
any - Second value to be compared (Right hand side of the comparison)
any - Value to be returned if the comparison evaluates to true.
any - Value to be returned if the comparison evaluates to false.

int

GetPageNumber
()

Returns the current page number of the report being printed

 

int

Print
(string)

Prints the specified report. On success it returns 0, otherwise the error code.

Parameters:

string - Name of the report report to be printed.

void

SetCopyNumber
(int)

Sets the number of copies of the document to be printed. Important to note that it is always set back to 1 (one) after each report print request is executed.

Parameters:

int - Number of the copies to be printed

int

SetQueryParam
(string,any)

Sets the report query parameter value. On success it returns 0, otherwise the error code.

Parameters:

string - Name of the report query parameter to be set
any - New parameter value

void

SetVariable
(string,any)

Sets the report variable.

Parameters:

string - Name of the report variable to be set
any - New variable value

void

SkipPrinterDialog
(boolean)

Sets the flag that determines if the printer dialog is skipped or not. When set to true, the report engine will not display the printer selection dialog and the report will be printed to the default printer. By default the printer dialog is displayed.

Parameters:

boolean - false to display the printer dialog (which is the default value), true to skip it

Scanner

Examples

int

CloseScanner
()

Closes the scanner. Returns 0 on success, otherwise the error code.

 

void

EnableBeeper
(boolean)

This method sets the flag to turn on or off the beep generated after a successful scan.

Parameters:

boolean - false to turn off the beep after a successful scan, true to turn it back on.

string

GetBarcode
()

Reads the barcode from the scanner when the scan is complete. It returns an empty string if a successful scan has not occurred yet.

 

int

GetBarcodeType
()

Returns the type of barcode label read.

 

int

GetScanResult
()

This method returns the result of the most recent scan.

 

Note:

If the last scan was successful, this method will return 0, otherwise the error code.

int

OpenScanner
()

Opens the scanner device for reading barcode labels. Returns 0 on success, otherwise the error code.

 

Note:

By default it uses the default scanner. Use SetScannerName method to set the desired scanner name, if necessary.

int

Scan
()

This method initiates a soft scan. Returns 0 on success, otherwise the error code.

 

Note:

This method can be called when a user clicks on a button, or an entry field is focused etc.

int

SetScannerName
()

This method sets the name of the scanner to be used.

 

Note:

This method is not needed if the default scanner is used.

Security

Examples

string

Decrypt
(string,base64Binary)

Decrypts the binary blob using the password passed and returns the decrypted string. If the function fails, it returns a null object.

Parameters:

string - Password to be used to decrypt the data
base64Binary - Binary blob data to be decrypted

base64Binary

Encrypt
(string,string)

Encrypts the string using the password passed and returns the encrypted data in a binary blob. If the function fails, it returns a null object.

Parameters:

string - Password to be used to encrypt the data
string - String data to be encrypted

string

MD5Digest
(any)

Calculates the MD5 digest for the value (string or binary) passed and returns the digest as a string

Parameters:

any - Value for which the MD5 digest is to be calculated

void

SetAlgorithm
(int)

Sets the encryption / decryption algorithm to be used. The default algorithm used is 3DES.

Parameters:

int - Algorithm to be used. Use system constants to set this parameter value.

SerialPort

Examples

int

Close
(string)

Closes the specified COM port. It returns 0 if successful, otherwise the error code.

Parameters:

string - Name of the COM port. For instance "COM1:". Please make sure a colon(:) is appended to the port name.

int

Flush
(string)

Flushes input and output buffers of the specified COM port. It returns 0 if successful, otherwise the error code.

Parameters:

string - Name of the COM port. For instance "COM1:". Please make sure a colon(:) is appended to the port name.

int

GetLastError
(string)

Returns the last error code for the specified COM port. It will return 0 if there was no error for the last action carried out on the COM port in question. It will return the error code 11262, if a timeout has occurred.

Parameters:

string - Name of the COM port. For instance "COM1:". Please make sure a colon(:) is appended to the port name.

int

Open
(string,int,int,int,int,int)

Opens the specified COM port. It returns 0 if successful, otherwise the error code.

Parameters:

string - Name of the COM port. For instance "COM1:". Please make sure a colon(:) is appended to the port name.
int - Baud rate (for instance 4800, 9600 etc.)
int - Bits in bytes to be transmitted (usually 8 or 7).
int - Parity. Use the serial port system constants for this parameter.
int - Number of stop bits. Use the serial port system constants for this parameter.
int - Handshake type (off, hardware, software). Use the serial port system constants for this parameter.

string

ReadBinary
(string,int)

Reads binary data from the specified COM port and returns the data read as a base64binary (blob) object. If there was nothing to read, then an empty blob object is returned. If there was an error or the function timed out, then a null object is returned. Use GetLastError to get the error code for the port in question.

Parameters:

string - Name of the COM port. For instance "COM1:". Please make sure a colon(:) is appended to the port name.
int - Timeout in milliseconds. If the function needs to return immediately if there was nothing to read from the COM port, then specify -1 or 0 for the timeout.

string

ReadBinaryMessage
(string,int,int,int)

Reads a binary message from the specified COM port. The message starts with the start byte value specified and ends with the byte value specified. If there was nothing to read, then an empty blob is returned. If there was an error or the function has timed out, then a null object is returned. Use GetLastError to get the error code for the port in question.

Parameters:

string - Name of the COM port. For instance "COM1:". Please make sure a colon(:) is appended to the port name.
int - Header byte marking the start of the message
int - Trailer byte marking the end of the message
int - Timeout in milliseconds. If the function needs to return immediately if there was nothing to read from the COM port, then specify -1 or 0 for the timeout.

string

ReadString
(string,int)

Reads data from the specified COM port and returns the data read as a string. If there was nothing to read, then an empty string is returned. If there was an error or the function timed out, then a null object is returned. Use GetLastError to get the error code for the port in question.

Parameters:

string - Name of the COM port. For instance "COM1:". Please make sure a colon(:) is appended to the port name.
int - Timeout in milliseconds. If the function needs to return immediately if there was nothing to read from the COM port, then specify -1 or 0 for the timeout.

string

ReadStringMessage
(string,string,string,int)

Reads a string message from the specified COM port. The message starts with the start character specified and ends with the end character specified. If there was nothing to read, then an empty string is returned. If there was an error or the function has timed out, then a null object is returned. Use GetLastError to get the error code for the port in question.

Parameters:

string - Name of the COM port. For instance "COM1:". Please make sure a colon(:) is appended to the port name.
string - Header character marking the start of the message
string - Trailer character marking the end of the message
int - Timeout in milliseconds. If the function needs to return immediately if there was nothing to read from the COM port, then specify -1 or 0 for the timeout.

int

WriteBinary
(string,base64Binary)

Sends the binary byte stream (blob) to the specified COM port. It returns 0 if the binary data has been sent successfully, otherwise the error code.

Parameters:

string - Name of the COM port. For instance "COM1:". Please make sure a colon(:) is appended to the port name.
base64Binary - Byte stream to be sent to the serial port.

int

WriteString
(string,string)

Sends a string to the specified COM port. It returns 0 if the string has been sent successfully, otherwise the error code.

Parameters:

string - Name of the COM port. For instance "COM1:". Please make sure a colon(:) is appended to the port name.
string - String to be sent to the serial port.

SMS

Examples

void

AddRecipient
(string)

Adds a new entry the recipient list

Parameters:

string - Recipient's phone number

Note:

Call this method multiple times if the SMS message has more than one recipient.

void

Reset
()

Resets all the settings (clears the recipient list etc.)

 

int

SendText
(string)

Sends a text message to the recipient(s) set. Returns 0 if the text message is sent successfully, otherwise the error code.

Parameters:

string - Text message to be sent

String

Examples

int

CharToInt
(string)

Returns the first character to the string passed as an integer value.

Parameters:

string - Source string

int

Compare
(string,string)

Compares the two strings specified. Zero if the strings are identical, a negative number if first string is less than the second string, a postive number if the first string is greater than the second string.

Parameters:

string - First string
string - Second string

int

CompareIgnoreCase
(string,string)

Compares the two strings specified ignoring case. Zero if the strings are identical, a negative number if first string is less than the second string, a postive number if the first string is greater than the second string.

Parameters:

string - First string
string - Second string

string

FormatNumber
(any,int,int,boolean)

Converts number to string using the format details.

Parameters:

any - Number to be converted to string
int - Number of digits before the decimal point. If left zero, this parameter is ignored.
int - Number of decimal places (i.e. number of digits after the decimal point).
boolean - If set to true, leading zeros will be pre-appended to reach the number of digits before the decimal point.

string

GetChar
(string,int)

Extracts the character at the specified index and returns as a string

Parameters:

string - Input string
int - Index of the character to be extracted

int

IndexOf
(string,string,int)

Returns the index within the string of the first occurrence of the specified string. If no such string occurs in this string, then -1 is returned.

Parameters:

string - String to be searched
string - String pattern
int - Starting index. 0 to start from the first character

string

Insert
(string,int,string)

Inserts a string into the source string at the specified location and returns a new string. On any error, the original string will be returned.

Parameters:

string - Source string
int - Source string index at which the string is to be inserted
string - String to be inserted

string

IntToChar
(int)

Creates a single character string by converting the integer value to a character.

Parameters:

int - An integer representing a character

boolean

IsAlpha
(string)

Checks if the character is an alphabetic character

Parameters:

string - String to be checked

boolean

IsDigit
(string)

Checks if the character is a decimal-digit character

Parameters:

string - String to be checked

boolean

IsEmpty
(string)

Returns true if the string is empty, otherwise false

Parameters:

string - String to be checked

boolean

IsLowerCase
(string)

Checks if the character is a lower character

Parameters:

string - String to be checked

boolean

IsPrintable
(string)

Checks if the character represents a printable character

Parameters:

string - String to be checked

boolean

IsUpperCase
(string)

Checks if the character is an uppercase character

Parameters:

string - String to be checked

boolean

IsWhiteSpace
(string)

Checks if the character represents a whitespace character

Parameters:

string - String to be checked

string

Left
(string,int)

Extracts the first (leftmost) number of characters specified from input string and returns a copy of the extracted substring

Parameters:

string - Input string
int - Specifies the number of characters to be extracted from the input string

int

Length
(string)

Returns the length of the input string (i.e. the number of characters in the string).

Parameters:

string - String of which length is to be returned

string

Mid
(string,int,int)

Extracts the number of characters specified starting from the location passed from the input string, and returns a string containing those extracted characters

Parameters:

string - Input string
int - Starting poistion. It is a zero based index (i.e. the first character has the index of zero).
int - Number of characters extracted from the location specified

string

Repeat
(string,int)

Creates a new string by repeating the specified string for the number of times specified.

Parameters:

string - String to be repeated
int - How many times the string is to be repeated

string

Replace
(string,string,string)

Replaces all occurrences of one string with another in the input string, and returns a new string.

Parameters:

string - Input string
string - Old string to be replaced in the input string
string - New string to replace the old string

int

ReverseIndexOf
(string,string)

Returns the index of the character from the end of the string specified. If no such character occurs in this string, then -1 is returned.

Parameters:

string - String to be used for the search
string - Character to be searched from the end of the string. Must be a single character string.

string

Right
(string,int)

Extracts the last (rightmost) number of characters specified from input string and returns a copy of the extracted substring

Parameters:

string - Input string
int - Specifies the number of characters to be extracted from the input string

string

SetChar
(string,int,string)

Sets (changes) the character at the specified index

Parameters:

string - Input string
int - Index of the character to be set (replaced)
string - New character as string

string

ToLowercase
(string)

Converts the string to lowercase, and returns a new string

Parameters:

string - String to be converted to lowercase

string

ToUppercase
(string)

Converts the input string to uppercase, and returns a new string

Parameters:

string - String to be converted to uppercase

string

Trim
(string)

Removes the leading and trailing whitespace characters from the input string, and returns a new string

Parameters:

string - String to be trimmed

string

TrimLeft
(string)

Removes the leading whitespace characters from the input string, and returns a new string

Parameters:

string - String to be trimmed

string

TrimRight
(string)

Removes the trailing whitespace characters from the input string, and returns a new string

Parameters:

string - String to be trimmed

Symbol

DEPRECATED - Please use Scanner Object

Examples

int

CloseScanner
()

Closes the scanner. Returns 0 on success, otherwise the error code.

 

string

GetBarcode
()

Reads the barcode from the scanner when the scan is complete. It returns an empty string if a successful scan has not occurred yet.

 

int

GetBarcodeType
()

Returns the type of barcode label read.

 

int

GetScanResult
()

This method returns the result of the most recent scan.

 

Note:

If the last scan was successful, this method will return 0, otherwise the error code.

int

OpenScanner
()

Opens the scanner device for reading barcode labels. Returns 0 on success, otherwise the error code.

 

Note:

By default a scanner named 'SCN1:' is opened. This is the name of the default scanner. Use SetScannerName method to set the desired scanner name, if necessary.

int

Scan
()

This method initiates a soft scan. Returns 0 on success, otherwise the error code.

 

Note:

This method can be called when a user clicks on a button, or an entry field is focused etc.

int

SetScannerName
()

This method sets the name of the scanner to be used.

 

Note:

This method is not needed if the default scanner is used.

Synchroniser

Examples

int

Connect
()

Establishes a server connection. It return a negative -10519 if new application updates have been received from server. Returns 0 if successful otherwise a positive error code.

 

Note:

This method goes hand in hand with Disconnect and ExecuteSyncRule methods to create your own synchronisation dialog instead of using the built-in Form.ShowSyncDialog.

int

DisableAll
()

Disables all the sync rules. Returns 0 if successful otherwise the error code.

 

Note:

A good design practice is to disable all sync rules before synchronisation to ensure that unnecessary synchronisation are not executed. Use this method before enabling the required sync rules.

int

Disconnect
()

Closes the server connection. Returns 0 if successful otherwise the error code.

 

Note:

This method goes hand in hand with Connect and ExecuteSyncRule methods to create your own synchronisation dialog instead of using the built-in Form.ShowSyncDialog.

int

EnableSyncRule
(string,boolean)

Enable the sync rule specified. Returns 0 if successful otherwise the error code.

Parameters:

string - Name of the sync rule to be disabled or enabled
boolean - true to enable, false to disable

Note:

Use the Form.ShowSyncDialog to start synchronisation after enabling the sync rules.

int

ExecuteSyncRule
(string)

Executes the sync rule specified. Returns 0 if successful otherwise the error code.

Parameters:

string - Name of the sync rule to be executed

Note:

This method goes hand in hand with Connect and Disconnect methods to create your own synchronisation dialog instead of using the built-in Form.ShowSyncDialog.

This method allows you to prioritise or sequence the sync rules that you want to run.

void

SetExecutionOrder
(string,int)

Sets the execution order of a sync rule. Note that sync rules are executed in the ascending execution order.

Parameters:

string - Name of the sync rule for which the execution order is to be set
int - New execution order for the sync rule

void

DisableAllBackgroundSyncRules
()

Disables all of the background sync rules

 

int

GetLastSyncError
()

Returns the last background synchronisation error

 

dateTime

GetLastSyncTime
()

Returns the time of the last successful background synchronisation

 

int

GetSynchronisedTableName
()

Returns the name or the comma separated names of the tables that were synchronised successfully by the last background synchronisation.

 

int

GetExecutedSyncRuleName
()

Returns the name or the comma separated names of the sync rules that were executed by the last background synchronisation.

 

int

GetPendingSyncRequestCount
()

Returns the number of pending background sync requests initiated by SynchroniseInBackground method

 

boolean

IsBackgroundSyncInProgress
()

Returns true if a background synchronisation is already in progress, otherwise false

 

int

MakeBackgroundSyncRule
(string,boolean)

This method marks a sync rule as a background executable sync rule. Returns 0 if successful otherwise the error code.

Parameters:

string - Name of the sync rule to be made background or not
boolean - true to make it background, otherwise false

void

ResetPendingSyncRequestCount
()

Clears the number of pending background sync requests counter

 

void

SetBackgroundSyncIdleTime
(int)

Sets the idle time of the background synchroniser. The background synchroniser sleeps for the duration specified to give change other components of BrightForms to execute. During this period, the background synchroniser does not process any sync requests. The minimum idle time that can be set is 5 seconds. It is by default 5 seconds.

Parameters:

int - Idle time in seconds

void

SetBackgroundSyncRetryTime
(int)

Sets the retry time of the background synchroniser to retry a failed sync rule. The minimum retry time that can be set is 300 seconds (5 minutes). It is by default 10 minutes.

Parameters:

int - Retry time in seconds

void

SynchroniseInBackground
()

Starts background synchronisation by singnalling the background synchroniser to execute enabled background sync rules

 

System

Examples

int

GetBrightFormsVersion
()

Returns the version of the BrightForms engine in which the application is running. If the BrightForms version is 1.2.3, then it will return 10203. That is, the major version is multiplied by 10000, and the minor version is multiplied by 100 and then they are simply added to the third bug fix version number. Similarly for Version 5.2.0, it will return 50200; and for Version 6.0.5, it will return 60005; and so on.

string

GetDeviceId
()

Returns the unique device id as a string

  1.  

string

GetDeviceName
()

Returns the name of the device

string

GetDiskFreeSpace
(string)

Returns the amount of space available on a disk volume in Kilo Bytes (KB). It returns -1 if the method is unsuccessful.

Parameters:

string - Specifies a directory on the specified disk of interest. If empty, then the current disk information will be returned.

Note:

Use an empty string or "\" for the main storage on the device.

Use "\Memory Card" or "\Storage Card" to find out the available free space on a SD card.

Use "c:\" for the free disk space on the C: drive on a desktop application.

string

GetIpAddress
()

Returns the comma separated list of IP addresses. An empty string will be returned on error

 

string

GetLineSeparator
()

Returns the OS specific line separator.

 

string

GetTodaysPassword
()

Returns the today's BrightForms settings password based on the current system date

 

boolean

RunProgram
(string,string)

Starts an external program. It does not wait for the external program to complete. The string passed must contain the path, the name of the program and the arguments to be passed to the program. Returns true if the program is started successfully, otherwise returns false.

Parameters:

string - Specifies the module to execute
string - Specifies the command line to be passed to the executable module

Note:

The command line to be passed to the executable module MUST be enclosed in double qoutes ("").

int

RunProgramAndWait
(string,string)

Starts an external program and waits for the external program to finish. The string passed must contain the path, the name of the program and the arguments to be passed to the program. Returns zero if the external program has completed successfully, otherwise returns the error code returned from the external program.

Parameters:

string - Specifies the module to execute
string - Specifies the command line to be passed to the executable module

Note:

The command line to be passed to the executable module MUST be enclosed in double qoutes ("").

int

SetDialupEntry
(string) - DEPRECATED

- Please use ConnectUsing Method

Sets the name of the RAS dialup entry to be used by BrightForms to initiate a call to BrightServer. Returns 0 if successful, otherwise the error code.

Parameters:

string - Name of the RAS dialup entry to be used

void

Sleep
(int)

Suspends the execution of the application for a specified interval.

Parameters:

int - Specifies the time in milliseconds

int

GetBatteryLevel
()

Returns the current battery level in percentage. Returns -1 if the battery level cannot be queried.

 

int

GetBatteryStatus
()

Returns the battery status. Use System constants to check the returned value. Returns -1 if the battery status cannot be queried.

 

int

IsBatteryCharging
()

Returns true if the battery is on AC power and charging, otherwise false.

 

string

GetAppLanguages
()

Returns the comma separated list of the names of the languages defined in the application. This is the list of short ISO language names (e.g. "def,en_US,fr"). Note that the application's default language is returned as "def" in the list.

  1.  

string

GetLanguage
()

Returns the application's current language name. This is the short ISO name (e.g. "en" for English or "en_AU" for Australian English or "def" for the default language). Note that the application's default language is returned as "def".

  1.  

int

SetLanguage
(string)

Sets the application language. BrightForms will use the resource strings for this language to present the application interface. To use the default application language, then specify "def" as the language name. Returns 0 if successful, otherwise the error code.

Parameters:
  1. string - Short ISO language name. This must be one of the languages defined in the application. Otherwise an error is returned. Use "def" to set the default language as the application language.

void

DisplayNotification
(string, string)

Display a notification message to the user outside of the application's normal UI.  When the user taps on the notification, the app will be brought to the foreground, in the same way as tapping the launch icon does..

Parameters:

string - The title of the user notification

string - The text body of the user notification

Supported on Android only.

When you tell the system to issue a notification, it first appears as an icon in the notification area. To see the details of the notification, the user opens the notification drawer. Both the notification area and the notification drawer are system-controlled areas that the user can view at any time.

void

Exit
(int)

Terminates the application and returns the status code passed to the operating system.

IMPORTANT NOTE: This method will terminate the application immediately without any cleanups or proper shutdown steps. Therefore it must be used with extreme caution as it may lead to data losses if not used correctly.

Parameters:

int - Exit status code to be returned to the OS. Return 0 to indicate a successful (normal) exit.

int

GetOS
()

Returns the operating system type that BrightForms is currently running on. Use system constants to evaluate the returned OS id.

 

int

GetOSMajorVersion
()

Returns the major version of the operating system that BrightForms is currently running on

 

int

GetOSMinorVersion
()

Returns the minor version of the operating system that BrightForms is currently running on

 

string

GetProjectAuthor
()

Returns the name of the project author

 

string

GetProjectDescription
()

Returns the project description

 

int

GetProjectId
()

Returns the id of the project

 

int

GetProjectReleaseNumber
()

Returns the project release number assigned by BrightServer

 

string

GetProjectVersion
()

Returns the user assigned project version set in BrightBuilder project settings

 

int

ExecuteObjectAction
(string,string)

Executes the specified object action.

Parameters:

string - Object name
string - The name of the action to be executed

void

ResetObjectState
()

Clears the object state that has been configured so far.

 

void

SetObjectState
(string,any)

Sets the value of the named object property/attribute.

Parameters:

string - The name of the property/attribute
any - New property/attribute value

void

SetObjectStateAsLong
(string,any)

Sets the value of the named object property/attribute as a 64 bit long value. Simply the value passed will be converted to a long number and set as the property/attribute value.

Parameters:

string - The name of the property/attribute
any - New property/attribute value

void

EnableAspect
(string, boolean)

Enables/disables the specified form aspect..

Parameters:

string - Name of the aspect to be used as the default aspect. Given the form and screen dimensions, if there is more than one aspect that could be used to display a form, then BrightForms will use this default aspect to choose the aspect of the form to be displayed.

boolean - True enables the form aspect, False disables it.

Note:
Disabled form aspects will not be included in the aspect calculations, and will not be shown on the device.

string

GetDefaultAspect
()

Returns the name of the default aspect.

 

int

GetScreenHeight
()

Returns the height of the screen in pixels.

 

int

GetScreenWidth
()

Returns the width of the screen in pixels.

 

void

SetDefaultAspect
(string)

Sets the name of the default aspect.

Parameters:

string - Name of the aspect to be used as the default aspect. Given the form and screen dimensions, if there is more than one aspect that could be used to display a form, then BrightForms will use this default aspect to choose the aspect of the form to be displayed.

string

GetDatabaseName
()

Returns the database name including full file path

 

string

GetPassword
()

Returns the user password from the settings file

 

string

GetProjectPath
()

Returns the full directory path where the project files are stored

 

int

GetPushListenerPortNumber
()

Returns the port number configured for the push listener

 

string

GetSettingsBoolValue
(string)

Returns the value of the specified setting as a boolean value or a null on error.

Parameters:

string - Name of the setting to be retrieved

string

GetSettingsIntValue
(string)

Returns the value of the specified setting as an integer value or a null on error.

Parameters:

string - Name of the setting to be retrieved

string

GetSettingsStringValue
(string)

Returns the value of the specified setting as a string value or a null on error.

Parameters:

string - Name of the setting to be retrieved

string

GetUserName
()

Returns the user name from the settings file

 

boolean

IsPasswordCorrect
(string)

Checks the string passed against the user password stored in the settings. If they match, it returns true, otherwise false.

Parameters:

string - String to be checked

boolean

IsUserNameCorrect
(string)

Checks the string passed against the user name stored in the settings. If they match, it returns true, otherwise false.

Parameters:

string - String to be checked

int

SetDatabaseName
(string)

Sets the database name including full file path. Returns 0 if successful, otherwise an error.

Parameters:

string - New database name

int

SetPassword
(string)

Sets the user password in the settings file. Returns 0 if successful, otherwise an error.

Parameters:

string - New user password

string

SetProjectPath
(string)

Sets the full directory path where the project files are stored. Returns 0 if successful, otherwise an error.

Parameters:

string - New project path

int

SetSettingsBoolValue
(string, any)

Sets the value of the specified setting as a boolean value. Returns 0 if successful, otherwise an error.

Parameters:

string - Name of the setting to be set
any - New value of the setting

int

SetSettingsIntValue
(string, any)

Sets the value of the specified setting as an integer value. Returns 0 if successful, otherwise an error.

Parameters:

string - Name of the setting to be set
any - New value of the setting

int

SetSettingsStringValue
(string, any)

Sets the value of the specified setting as a string value. Returns 0 if successful, otherwise an error.

Parameters:

string - Name of the setting to be set
any - New value of the setting

int

SetUserName
(string)

Sets the user name in the settings file. Returns 0 if successful, otherwise an error.

Parameters:

string - New user name

int

PlaySound
(string,boolean)

Plays a sound specified by a file name. Returns 0 if successful, otherwise an error code.

Parameters:

string - Name of the sound file to be played
boolean - If set to true, then the sound plays repeatedly until StopSound is called. Otherwise the sound is to be played only once.

void

StopSound
()

Stops the sound that is being played in a loop.

 

string

GetUserAgent
()

Returns the user agent details of the current user. This is the User-Agent value of the HTTP header received from the remote user device.

 

void

MarkFileForDownload
(string,string)

Marks the specified file for download. The file will be requested for download by the current web form.

Parameters:

string - The full path and name of the file to be downloaded by the browser.
string - The actual file name that the user will be presented with when the file download is started by the browser. This can be totally different from the physical file name, and should not contain any file path.

Trace

Examples

void

Debug
(string)

Logs a "debug" level message to the BrightForms trace file. This method creates a log entry only if the trace level is set to "debug" on the "System" tab in the BrightForms Settings page.

Parameters:

string - Message to be logged

void

Error
(string,int)

Logs an "error" level message to the BrightForms trace file together with the error number passed. This method creates a log entry only if the trace level is set to "debug", "info", "warning" or "error" on the "System" tab in the BrightForms Settings page.

Parameters:

string - Message to be logged
int - Error number to be logged together with the error message

void

Info
(string)

Logs an "info" level message to the BrightForms trace file. This method creates a log entry only if the trace level is set to "debug" or "info" on the "System" tab in the BrightForms Settings page.

Parameters:

string - Message to be logged

void

Warning
(string)

Logs a "warning" level message to the BrightForms trace file. This method creates a log entry only if the trace level is set to "debug", "info", or "warning" on the "System" tab in the BrightForms Settings page.

Parameters:

string - Message to be logged

Zip

Examples

base64Binary

UnzipBinary
(base64Binary)

Decompresses (unzips) the binary data passed and returns a decompressed binary stream. It will return NULL if the method fails. This object uses the zlib library.

Parameters:

base64Binary - Binary data to be decompressed (unzipped)

base64Binary

ZipBinary
(base64Binary)

Compresses (zips) the binary data passed and returns a compressed binary stream. It will return NULL if the method fails. This object uses the zlib library.

Parameters:

base64Binary - Binary data to be compressed (zipped)

Control Objects

Button

Examples

void

Disable
()

Disables the button.

 

void

Enable
()

Enables the button.

 

void

Hide
()

Hides the button.

 

void

DoClick
()

Simulates button click event as if the user clicked on the button.

 

boolean

IsEnabled
()

Returns true if the button is enabled, otherwise false.

 

boolean

IsVisible
()

Return true if the button is visible, otherwise false.

 

void

SetBackgroundColor
(int,int,int)

Changes the background color of the control

Parameters:

int - Specifies the intensity of the red color
int - Specifies the intensity of the green color
int - Specifies the intensity of the blue color

void

SetCaption
()

Updates the button caption.

Parameters:

string - New button caption

void

SetFocus
()

Sets the focus to the button control

 

void

SetFont
(string,string,int)

Changes the current font to the specified font

Parameters:

string - Font name
string - Font style ("Plain", "Bold", "Italic" or "Bold Italic")
int - Font size

Note:

Ensure that the Font you specify is available on your device.

void

SetTextColor
(int,int,int)

Changes the text color of the control

Parameters:

int - Specifies the intensity of the red color
int - Specifies the intensity of the green color
int - Specifies the intensity of the blue color

void

Show
()

Shows the button.

 

int

GetHeight
()

Returns the control's height

 

int

GetLeft
()

Returns the control's left position on the form

 

int

GetTop
()

Returns the control's top position on the form

 

int

GetWidth
()

Returns the control's width

 

void

Move
(int,int,int,int)

Moves the control to a new position

Parameters:

int - x : The new position of the left side of the control
int - y : The new position of the top of the control
int - Width : The new width of the control
int - Height : The new height of the control

CheckBox

Examples

void

Disable
()

Disables the check box.

 

void

Enable
()

Enables the check box.

 

void

Hide
()

Hides the check box.

 

void

DoClick
()

Simulates button click event as if the user clicked on the check box.

 

boolean

IsDirty
()

Checks if the check box state has been altered by the user. Returns true if the check box state has changed, otherwise false.

 

boolean

IsEnabled
()

Returns true if the check box is enabled, otherwise false.

 

boolean

IsVisible
()

Return true if the check box is visible, otherwise false.

 

void

ResetDirty
()

Resets the dirty state and sets the current value as the reference value to be compared later to check if the check-box state has been modified or not.

 

void

SetBackgroundColor
(int,int,int)

Changes the background color of the control

Parameters:

int - Specifies the intensity of the red color
int - Specifies the intensity of the green color
int - Specifies the intensity of the blue color

void

SetCaption
()

Updates the checkbox caption.

Parameters:

string - New checkbox caption

void

SetFocus
()

Sets the focus to the check box

 

void

SetFont
(string,string,int)

Changes the current font to the specified font

Parameters:

string - Font name
string - Font style ("Plain", "Bold", "Italic" or "Bold Italic")
int - Font size

Note:

Ensure that the Font you specify is available on your device.

void

SetTextColor
(int,int,int)

Changes the text color of the control

Parameters:

int - Specifies the intensity of the red color
int - Specifies the intensity of the green color
int - Specifies the intensity of the blue color

void

Show
()

Shows the check box.

 

int

GetHeight
()

Returns the control's height

 

int

GetLeft
()

Returns the control's left position on the form

 

int

GetTop
()

Returns the control's top position on the form

 

int

GetWidth
()

Returns the control's width

 

void

Move
(int,int,int,int)

Moves the control to a new position

Parameters:

int - x : The new position of the left side of the control
int - y : The new position of the top of the control
int - Width : The new width of the control
int - Height : The new height of the control

ComboBox

Examples

void

AddString
(string)

Adds a new item to the combo box

Parameters:

string - New string item to be added to the combo box

void

Disable
()

Disables the combo box.

 

void

Enable
()

Enables the combo box.

 

any

GetCurrentRowColumnValue
(string)

Returns the value of the specified column of the current selection

Parameters:

string - Database name of the column.

Note:

This method is useful to derive column values for data passing or execution of an event.

int

GetItemCount
()

Returns the number of entries (items) in the combo box

 

int

GetSelection
()

Returns the current selection index. -1 if no selection is made.

 

Note:

This method is useful to check if users selected from the list or not. This minimizes the execution of an event if no selection was made.

void

Hide
()

Hides the combo box.

 

void

HideSIP
()

Hides the software input panel(software keyboard) on Windows CE devices

 

boolean

IsDirty
()

Checks if the combo box selection has been altered by the user. Returns true if the combo box selection has changed, otherwise false.

 

boolean

IsEnabled
()

Returns true if the combo box is enabled, otherwise false.

 

boolean

IsVisible
()

Return true if the combo box is visible, otherwise false.

 

void

Refresh
()

Refreshes the content of the combo box by re-running the query.

 

Note:

Make sure that all query parameters have been initialised before the refresh method is executed.

Initialise parameters by assigning values to it. Parameters are listed under the Form\Parameters of the Data Source Tree.

void

Reset
()

Clears the content of the combo box as well as its edit control

 

void

ResetDirty
()

Resets the dirty state and sets the current value as the reference value to be compared later to check if the combobox has been modified or not.

 

void

SetDisplayColumn
(string)

Sets the name of the database column whose values are to be displayed in the combo box.

Parameters:
  1. string - Name of the database column which is one of the output columns of the combo box's query

void

SetFocus
()

Sets the focus to the combo box

 

void

SetFont
(string,string,int)

Changes the current font to the specified font

Parameters:

string - Font name
string - Font style ("Plain", "Bold", "Italic" or "Bold Italic")
int - Font size

Note:

Ensure that the Font you specify is available on your device.

void

SetInputMethod
(string)

Selects the software input panel type (keyboard, transcriber etc.) on Windows CE devices

Parameters:

string - Name of the input panel. Use System constants to specify the type of the software input panel to be used.

void

SetSelection
(int)

Sets the current selection.

Parameters:

int - New selection index. -1 deselects the current selection.

int

SetSql
(string)

Updates the combobox's advanced SQL SELECT statement. This method will be ignored if the combobox query is not of an Advanced SQL type. Returns 0 if successful, otherwise the error code.

Parameters:
  1. string - New SQL SELECT statement to be used by the combobox's query.

int

SetSqlParam
(string,any)

Sets the advanced SQL query parameter value. Query parameters are defined by the question marks (?) in the SQL statements. The query parameter set by this method is used only for the Advanced SQL queries, otherwise this method call will be ignored. Returns 0 if successful, otherwise the error code.

Parameters:
  1. string - Advanced SQL query parameter name. For advanced queries, query parameters are named as Param1, Param2,...
    any - New SQL query parameter value

void

Show
()

Shows the combo box.

 

void

ShowSIP
()

Launches the sofware input panel(software keyboard) on Windows CE devices

 

int

GetHeight
()

Returns the control's height

 

int

GetLeft
()

Returns the control's left position on the form

 

int

GetTop
()

Returns the control's top position on the form

 

int

GetWidth
()

Returns the control's width

 

void

Move
(int,int,int,int)

Moves the control to a new position

Parameters:

int - x : The new position of the left side of the control
int - y : The new position of the top of the control
int - Width : The new width of the control
int - Height : The new height of the control

DateTimePicker

Examples

void

Disable
()

Disables the date time picker.

 

void

Enable
()

Enables the date time picker.

 

void

Hide
()

Hides the date time picker.

 

boolean

IsDirty
()

Checks if the date time selection has been altered by the user. Returns true if the date time selection has changed, otherwise false.

 

boolean

IsEnabled
()

Returns true if the date time picker is enabled, otherwise false.

 

boolean

IsVisible
()

Return true if the date time picker is visible, otherwise false.

 

void

ResetDirty
()

Resets the dirty state and sets the current value as the reference value to be compared later to check if the date-time selection has been modified or not.

 

void

SetFocus
()

Sets the focus to the date-time control

 

void

SetFont
(string,string,int)

Changes the current font to the specified font

Parameters:

string - Font name
string - Font style ("Plain", "Bold", "Italic" or "Bold Italic")
int - Font size

Note:

Ensure that the Font you specify is available on your device.

void

Show
()

Shows the date time picker.

 

int

GetHeight
()

Returns the control's height

 

int

GetLeft
()

Returns the control's left position on the form

 

int

GetTop
()

Returns the control's top position on the form

 

int

GetWidth
()

Returns the control's width

 

void

Move
(int,int,int,int)

Moves the control to a new position

Parameters:

int - x : The new position of the left side of the control
int - y : The new position of the top of the control
int - Width : The new width of the control
int - Height : The new height of the control

EditControl

Examples

void

Disable
()

Disables the edit control.

 

void

Enable
()

Enables the edit control.

 

void

EnableActionTextChange
()

Turns on or off the text change events. If turned off, then text change events will not be run.

Parameters:

boolean - false to turn off the text change events fired by the edit control, otherwise true to enable text change events. Note that, by default, edit control text change events are enabled.

void

Hide
()

Hides the edit control.

 

void

HideSIP
()

Hides the sofware input panel (software keyboard) on Windows CE devices

 

boolean

IsDirty
()

Checks if the edit field has been altered by the user. Returns true if the edit field has changed, otherwise false.

 

boolean

IsEnabled
()

Returns true if the edit control is enabled, otherwise false.

 

boolean

IsVisible
()

Return true if the edit control is visible, otherwise false.

 

void

ReadOnly
(boolean)

Turns ON or OFF the edit control's read-only attribute

Parameters:

boolean - true if the edit control is to be read only, otherwise false

void

ResetDirty
()

Resets the dirty state and sets the current value as the reference value to be compared later to check if the edit field has been modified or not.

 

void

SelectText
(int,int)

Selects a range of characters in the edit control

Parameters:

int - Specifies the starting position. If the starting position is zero and the ending position is -1, all the text in the edit control is selected. If the starting position is -1, any current selection is removed.
int - Specifies the ending position

void

SetBackgroundColor
(int,int,int)

Changes the background color of the control

Parameters:

int - Specifies the intensity of the red color
int - Specifies the intensity of the green color
int - Specifies the intensity of the blue color

void

SetFocus
()

Sets the focus to the edit control

 

void

SetFont
(string,string,int)

Changes the current font to the specified font

Parameters:

string - Font name
string - Font style ("Plain", "Bold", "Italic" or "Bold Italic")
int - Font size

Note:

Ensure that the Font you specify is available on your device.

void

SetHintText
(string)

Sets the hint text to be displayed when the Edit control is empty

Parameters:

string- Hint text.  Empty string will remove the hint.

void

SetInputMethod
(string)

Selects the software input panel type (keyboard, transcriber etc.) on Windows CE devices

Parameters:

string - Name of the input panel. Use System constants to specify the type of the software input panel to be used.

void

SetPrecision
(int)

Changes the number precision of the edit control.

Parameters:

int - Number of digits after the decimal point

void

SetTextColor
(int,int,int)

Changes the text color of the control

Parameters:

int - Specifies the intensity of the red color
int - Specifies the intensity of the green color
int - Specifies the intensity of the blue color

void

Show
()

Shows the edit control.

 

void

ShowSIP
()

Launches the sofware input panel(software keyboard) on Windows CE devices

 

int

GetHeight
()

Returns the control's height

 

int

GetLeft
()

Returns the control's left position on the form

 

int

GetTop
()

Returns the control's top position on the form

 

int

GetWidth
()

Returns the control's width

 

void

Move
(int,int,int,int)

Moves the control to a new position

Parameters:

int - x : The new position of the left side of the control
int - y : The new position of the top of the control
int - Width : The new width of the control
int - Height : The new height of the control

GroupBox

Examples

void

Disable
()

Disables the group box.

 

void

Enable
()

Enables the group box.

 

void

Hide
()

Hides the group box.

 

boolean

IsEnabled
()

Returns true if the group box is enabled, otherwise false.

 

boolean

IsVisible
()

Return true if the group box is visible, otherwise false.

 

void

SetBackgroundColor
(int,int,int)

Changes the background color of the control

Parameters:

int - Specifies the intensity of the red color
int - Specifies the intensity of the green color
int - Specifies the intensity of the blue color

void

SetCaption
()

Updates the groupbox caption.

Parameters:

string - New groupbox caption

void

SetFont
(string,string,int)

Changes the current font to the specified font

Parameters:

string - Font name
string - Font style ("Plain", "Bold", "Italic" or "Bold Italic")
int - Font size

Note:

Ensure that the Font you specify is available on your device.

void

SetTextColor
(int,int,int)

Changes the text color of the control

Parameters:

int - Specifies the intensity of the red color
int - Specifies the intensity of the green color
int - Specifies the intensity of the blue color

void

Show
()

Shows the group box.

 

int

GetHeight
()

Returns the control's height

 

int

GetLeft
()

Returns the control's left position on the form

 

int

GetTop
()

Returns the control's top position on the form

 

int

GetWidth
()

Returns the control's width

 

void

Move
(int,int,int,int)

Moves the control to a new position

Parameters:

int - x : The new position of the left side of the control
int - y : The new position of the top of the control
int - Width : The new width of the control
int - Height : The new height of the control

Image

Examples

void

Disable
()

Disables the image.

 

void

Enable
()

Enables the image.

 

void

Hide
()

Hides the image.

 

boolean

IsEnabled
()

Returns true if the image is enabled, otherwise false.

 

boolean

IsVisible
()

Return true if the image is visible, otherwise false.

 

void

Show
()

Shows the image.

 

int

GetHeight
()

Returns the control's height

 

int

GetLeft
()

Returns the control's left position on the form

 

int

GetTop
()

Returns the control's top position on the form

 

int

GetWidth
()

Returns the control's width

 

void

Move
(int,int,int,int)

Moves the control to a new position

Parameters:

int - x : The new position of the left side of the control
int - y : The new position of the top of the control
int - Width : The new width of the control
int - Height : The new height of the control

Label

Examples

void

Disable
()

Disables the static label.

 

void

DoClick
()

Simulates button click event as if the user clicked on the label.

 

void

Enable
()

Enables the static label.

 

void

Hide
()

Hides the static label.

 

boolean

IsEnabled
()

Returns true if the label is enabled, otherwise false.

 

boolean

IsVisible
()

Return true if the label is visible, otherwise false.

 

void

SetBackgroundColor
(int,int,int)

Changes the background color of the control

Parameters:

int - Specifies the intensity of the red color
int - Specifies the intensity of the green color
int - Specifies the intensity of the blue color

void

SetFont
(string,string,int)

Changes the current font to the specified font

Parameters:

string - Font name
string - Font style ("Plain", "Bold", "Italic" or "Bold Italic")
int - Font size

Note:

Ensure that the Font you specify is available on your device.

void

SetTextColor
(int,int,int)

Changes the text color of the control

Parameters:

int - Specifies the intensity of the red color
int - Specifies the intensity of the green color
int - Specifies the intensity of the blue color

void

SetWebLink
(string)

Sets the web URL that the label control will open in another window or tab, when it is clicked.

Parameters:

string - Web URL to be opened when the label control is clicked.

void

Show
()

Shows the static label.

 

int

GetHeight
()

Returns the control's height

 

int

GetLeft
()

Returns the control's left position on the form

 

int

GetTop
()

Returns the control's top position on the form

 

int

GetWidth
()

Returns the control's width

 

void

Move
(int,int,int,int)

Moves the control to a new position

Parameters:

int - x : The new position of the left side of the control
int - y : The new position of the top of the control
int - Width : The new width of the control
int - Height : The new height of the control

ListView / Simple List

Examples

int

DeleteAllColumns
()

Deletes all the columns of the list view control. Returns 0 if successful, otherwise the error code.

  1.  

int

DeleteColumn
(int)

Deletes the list view column at the specified index. Returns 0 if successful, otherwise the error code.

Parameters:
  1. int - Index of the column to be deleted. Column indexes start from 0.

void

DeselectAll
()

If the listview has a checkbox column, it marks all the items in the list as deselected (i.e. all the checkboxes are unchecked).

 

Note:

This method is ignored if the listview does not have a checkbox column selected.

void

Disable
()

Disables the list view.

 

void

Enable
()

Enables the list view.

 

int

GetColumnCount
()

Returns the current number of columns (headers) defined for the listview.

 

any

GetColumnValue
(int, string)

Returns the value of the specified column at the specified row.

Parameters:

int - Row index
string - Column name

any

GetCurrentRowColumnValue
(string)

Returns the value of the specified column of the current highlighted row.

Parameters:

string - Database name of the column.

Note:

This method is useful to derive column values for data passing or execution of an event.

int

GetItemCount
()

Returns the number of rows (items) in the list view

 

int

GetSelectedCount
()

Returns the number of selected rows (items) in the list view

 

int

GetSelection
()

Returns the current selected row index. Returns -1 if no row has been selected yet.

 

Note:

This method is useful to check if users selected from the list or not. This minimizes the execution of an event if no selection was made.

any

GetValue
(int,int)

Returns the value of the specified column at the specified row. This method works ONLY if the row is visible i.e. in the internal cache of the listview. Otherwise a null value is returned.

Parameters:

int - Row index
int - Column index

int

GetVertScrollPos
()

Returns the vertical scroll position

 

void

Hide
()

Hides the list view.

 

int

InsertColumn
(int,string,string,string,int,int)

Inserts a new column in the listview control. Returns 0 if successful, otherwise the error code.

Parameters:
  1. int - Index of the new column. Column indexes start from 0.
    string - Column header text
    string - Query column output name. This column will display the values of this output column in the query resultset.
    string - Format of the text in the list view cell. This is an optional field.
    int - List view column width as a percentage of the length of the listview control.
    int - Alignment of the text in this column. Use System "Listview Cell Alignment Type" contants to specify the cell alignment.

boolean

IsGridDataChanged
()

Checks if the grid data has been changed by the user (i.e. if the grid data is dirty). Returns true if the grid data has been modified by the user, otherwise false.

 

boolean

IsRowDirty
()

Checks if the grid data row has been changed by the user (i.e. if the grid data at the specified row is dirty). Returns true if the row data has been modified by the user, otherwise false.

 

boolean

IsRowSelected
(int)

Checks if the specified list view row is selected. Returns true if selected, otherwise false.

Parameters:

int - Zero based index of the list row whose selection state is to be retrieved. This means that the index of the first row is zero.

boolean

IsEnabled
()

Returns true if the listview is enabled, otherwise false.

 

boolean

IsVisible
()

Return true if the listview is visible, otherwise false.

 

void

ReadOnly
(boolean)

Turns ON or OFF the listview control's read-only attribute

Parameters:

boolean - true if the listview control is to be read only, otherwise false

Note:

This method will make the listview checkboxes read only, disallowing user input but still allowing the action events to be executed.

void

Refresh
()

Refreshes the content of the list view by re-running the query

 

Note:

Make sure that all query parameters have been initialised before the refresh method is executed.

Initialise parameters by assigning values to it. Parameters are listed under the Form\Parameters of the Data Source Tree.

void

ResetFilter
()

Resets the filter criteria to show all records in the listview. Need to call Refresh method after calling this method.

 

void

RestoreColumnWidths
()

Resets the column widths to the design-time values.

 

int

Save
()

Saves the grid data. Returns 0 if successful, otherwise the error code.

 

void

SelectAll
()

If the listview has a checkbox column, it marks all the items in the list as selected (i.e. all the checkboxes are checked).

 

Note:

This method is ignored if the listview does not have a checkbox column selected.

int

SetColumnValue
(int,string,any)

Updates the value of the specified column at the specified row. Returns 0 if successful, otherwise the error code.

Parameters:

int - Row index
string - Column name
any - New value

void

SetFilter
(string,string)

Sets the filter criteria on the specified column. Need to call Refresh method after setting the filter.

Parameters:

string - Filter column name. Include table name if necessary using TableName.ColumnName format
string - Filter value

void

SetFocus
()

Sets the focus to the list view control

 

void

SetFont
(string,string,int)

Changes the current font to the specified font

Parameters:

string - Font name
string - Font style ("Plain", "Bold", "Italic" or "Bold Italic")
int - Font size

Note:

Ensure that the Font you specify is available on your device.

void

SetSelection
(int)

Sets the current selection.

Parameters:

int - New selection index. -1 deselects the current selection.

void

SetSortOrder
(string)

Sets the sort order by which the listview records are to be sorted. Need to call Refresh method after setting the sort order.

Parameters:

string - This is the sort order. It is simply consisted of comma separated column names and/or their sort types (ASC for ascending or DESC for descending)

Note:

Default sort order is ascending. For instance "NAME" is identical to "NAME ASC". However if the name column is to be sorted by descending order, then "NAME DESC" must be specified. Multiple columns can be specified with different sort types (ASC or DESC separated with a space from the column name). An example for multiple column sort order would be "NAME ASC, AGE DESC".

int

SetSql
(string)

Updates the listview's advanced SQL SELECT statement. This method will be ignored if the listview query is not of an Advanced SQL type. Returns 0 if successful, otherwise the error code.

Parameters:
  1. string - New SQL SELECT statement to be used by the listview's query.

int

SetSqlParam
(string,any)

Sets the advanced SQL query parameter value. Query parameters are defined by the question marks (?) in the SQL statements. The query parameter set by this method is used only for the Advanced SQL queries, otherwise this method call will be ignored. Returns 0 if successful, otherwise the error code.

Parameters:
  1. string - Advanced SQL query parameter name. For advanced queries, query parameters are named as Param1, Param2,...
    any - New SQL query parameter value

int

SetValue
(int,int,any)

Updates the value of the specified column at the specified row. This method works ONLY if the row is visible i.e. in the internal cache of the listview. Returns 0 if successful, otherwise the error code.

Parameters:

int - Row index
int - Column index
any - New value

void

SetVertScrollPos
(int)

Scrolls to the new vertical scroll position

Parameters:

int - New vertical scroll position

void

Show
()

Shows the list view.

 

void

ShowColumn
(int,boolean)

Shows or hides a listview column. The column index specifies the one of columns selected at the design time.

Parameters:

int - Index of the column to be shown or hidden. The index of the first column is zero.
boolean - true if the column is to be shown, or false if the column is to be hidden

int

GetHeight
()

Returns the control's height

 

int

GetLeft
()

Returns the control's left position on the form

 

int

GetTop
()

Returns the control's top position on the form

 

int

GetWidth
()

Returns the control's width

 

void

Move
(int,int,int,int)

Moves the control to a new position

Parameters:

int - x : The new position of the left side of the control
int - y : The new position of the top of the control
int - Width : The new width of the control
int - Height : The new height of the control

RadioButton

Examples

void

Disable
()

Disables the radio button group

 

void

DisableSelf
()

Disables this radio button only

 

void

Enable
()

Enables the radio button group

 

void

EnableSelf
()

Enables this radio button only

 

void

Hide
()

Hides the radio button group

 

void

HideSelf
()

Hides this radio button only

 

void

DoClick
()

Simulates button click event as if the user clicked on the radio button.

 

boolean

IsDirty
()

Checks if the radio button selection has been altered by the user. Returns true if the radio button selection has changed, otherwise false.

 

boolean

IsEnabled
()

Returns true if the radio button is enabled, otherwise false.

 

boolean

IsVisible
()

Return true if the radio button is visible, otherwise false.

 

void

ResetDirty
()

Resets the dirty state and sets the current value as the reference value to be compared later to check if the radio button selection has been modified or not.

 

void

SetBackgroundColor
(int,int,int)

Changes the background color of the control

Parameters:

int - Specifies the intensity of the red color
int - Specifies the intensity of the green color
int - Specifies the intensity of the blue color

void

SetCaption
()

Updates the radio button caption

Parameters:

string - New radio buttton caption

void

SetFocus
()

Sets the focus to the radio button

 

void

SetFont
(string,string,int)

Changes the current font to the specified font

Parameters:

string - Font name
string - Font style ("Plain", "Bold", "Italic" or "Bold Italic")
int - Font size

Note:

Ensure that the Font you specify is available on your device.

void

SetTextColor
(int,int,int)

Changes the text color of the control

Parameters:

int - Specifies the intensity of the red color
int - Specifies the intensity of the green color
int - Specifies the intensity of the blue color

void

Show
()

Shows the radio button group

 

void

ShowSelf
()

Shows this radio button only

 

int

GetHeight
()

Returns the control's height

 

int

GetLeft
()

Returns the control's left position on the form

 

int

GetTop
()

Returns the control's top position on the form

 

int

GetWidth
()

Returns the control's width

 

void

Move
(int,int,int,int)

Moves the control to a new position

Parameters:

int - x : The new position of the left side of the control
int - y : The new position of the top of the control
int - Width : The new width of the control
int - Height : The new height of the control

Scribble

Examples

void

Disable
()

Disables the scribble control.

 

void

Enable
()

Enables the scribble control.

 

void

Hide
()

Hides the scribble control.

 

boolean

IsDirty
()

Checks if the signature field has been altered by the user. Returns true if the signature has changed, otherwise false.

 

boolean

IsEnabled
()

Returns true if the scribble is enabled, otherwise false.

 

boolean

IsVisible
()

Return true if the scribble is visible, otherwise false.

 

void

LoadBinary
(base64Binary)

Loads the binary image into the scribble control

Parameters:

base64Binary - Binary blob (image as a byte stream)

void

LoadBitmapBinary
(base64Binary) - DEPRECATED

- Please use LoadBinary Method

Loads the bitmap byte values into the scribble control

Parameters:

base64Binary - Binary blob (bitmap as a byte stream)

void

LoadBitmapFile
(string) - DEPRECATED

- Please use LoadFile Method

Loads the bitmap file specified into the scribble control

Parameters:

string - Name and location of the bitmap file to be loaded

void

LoadFile
(string)

Loads the image file specified into the scribble control

Parameters:

string - Name and location of the image file to be loaded

void

Reset
()

Clears the scribble preparing for a new entry.

 

void

ResetDirty
()

Resets the dirty state and sets the current value as the reference value to be compared later to check if the signature field has been modified or not.

 

void

SaveBitmapFile
(string)

Saves the scribble to the bitmap file specified

Parameters:

string - Name and location of the bitmap file in which the scribble is to be stored

void

SaveJPEGFile
(string)

Saves the scribble to a JPEG file specified

Parameters:

string - Name and location of the JPEG file in which the scribble is to be stored

void

Show
()

Shows the scribble control.

 

void

EnableUndoRedo
(boolean)

Turns on and off change tracking for the control. By default, it is turned off.

This method must be turned on for Undo() and Redo() methods to work.

boolean - True to turn on the change tracking, false to turn off

void

Redo
()

Redraw the previously removed change.

 

void

Undo
()

Removes the most recent change.

 

void

SetPenColor
(int,int,int)

Changes the pen color of the control

Parameters:

int - Specifies the intensity of the red color
int - Specifies the intensity of the green color
int - Specifies the intensity of the blue color

void

SetPenWidth
(int)

Changes the pen width of the control

 

int

GetHeight
()

Returns the control's height

 

int

GetLeft
()

Returns the control's left position on the form

 

int

GetTop
()

Returns the control's top position on the form

 

int

GetWidth
()

Returns the control's width

 

void

Move
(int,int,int,int)

Moves the control to a new position

Parameters:

int - x : The new position of the left side of the control
int - y : The new position of the top of the control
int - Width : The new width of the control
int - Height : The new height of the control

void

EnableSnapToGrid
(boolean)

Enable or disable the snap to grid functionality for the control.

Parameters:

boolean - true to turn on the snap-to-grid, false to turn off

void

SetGridSize
(int)

Changes the grid size when scribble control is in 'line mode'.

Parameters:

int - New grid size