Communicating With Tomtom Navigator From Visual Basic; Introduction; Supported Api Calls; Function Getsdkversioninfo( ) As String - TomTom Navigator SDK Installation And Use Manual

Version 3.0 build 193
Table of Contents

Advertisement

5. Communicating with TomTom
Navigator from Visual Basic

5.1. Introduction

The TTNControl.ocx ActiveX control allows Visual Basic developers to create applications that can
send commands to and request information from TomTom Navigator. To do this you simply have to place
an instance of the TTNControl.ocx ActiveX control in the forms of your Visual Basic application. The
control should be made invisible, since it has no interest for the user interface: all the work is carried out
programmatically through OLE automation commands sent to it.
Please note that Pocket PC emulators do not always emulate real devices. Also, compatibility conflicts
can arise with emulators that do not occur when running an application directly on a Pocket PC device. We
therefore recommend to run applications directly on the device.
TTNControl.ocx defines a class called "TomTomNavigator", which is the ActiveX control that you
have to instantiate. Besides the properties common to all ActiveX controls, the "TomTomNavigator" class
defines a number of functions to enable communication with the TomTom Navigator application. You can
view these functions using the Object Browser from within the eMbedded Visual Basic development
environment. All these functions can raise errors at run time that need to be handled using the standard
Visual Basic error handling mechanism.
For example, if the name given to the instance of TTNControl.ocx in your form is "TTNav", the
following lines of code will request the version number of the TomTom Navigator SDK:
Dim sdkVersion As String
sdkVersion = TTNav.GetSdkVersionInfo

5.2. Supported API calls

The function calls currently supported are:

5.2.1. Function GetSdkVersionInfo( ) As String

Returns: SDK version as a string
Supported Since: TTN 1.42
Returns the SDK version number information with the format "version (build number)."

5.2.2. Function GetNavigatorVersionInfo( ) As String

Returns: Navigator version as a string
Supported Since: TTN 1.42
Returns the version number information of TomTom Navigator with the format "version (build
number)."

5.2.3. Sub BringNavigatorToForeground( )

Supported Since: TTN 1.42
Puts the TomTom Navigator application in the foreground.

5.2.4. Sub SwitchToNavigatorView( )

Supported Since: TTN 1.42
15

Advertisement

Table of Contents
loading

Table of Contents