11. Using Yocto-GPS with Visual Basic .NET
VisualBasic has long been the most favored entrance path to the Microsoft world. Therefore, we had
to provide our library for this language, even if the new trend is shifting to C#. All the examples and
the project models are tested with Microsoft VisualBasic 2010 Express, freely available on the
Microsoft web site
1
.
11.1. Installation
Download the Visual Basic Yoctopuce library from the Yoctopuce web site
2
. There is no setup
program, simply copy the content of the zip file into the directory of your choice. You mostly need the
content of the
Sources
directory. The other directories contain the documentation and a few
sample programs. All sample projects are Visual Basic 2010, projects, if you are using a previous
version, you may have to recreate the projects structure from scratch.
11.2. Using the Yoctopuce API in a Visual Basic project
The Visual Basic.NET Yoctopuce library is composed of a DLL and of source files in Visual Basic.
The DLL is not a .NET DLL, but a classic DLL, written in C, which manages the low level
communications with the modules
3
. The source files in Visual Basic manage the high level part of the
API. Therefore, your need both this DLL and the .vb files of the
sources
directory to create a
project managing Yoctopuce modules.
Configuring a Visual Basic project
The following indications are provided for Visual Studio Express 2010, but the process is similar for
other versions. Start by creating your project. Then, on the
Solution Explorer
panel, right click on your
project, and select "Add" and then "Add an existing item".
A file selection window opens. Select the
yocto_api.vb
file and the files corresponding to the
functions of the Yoctopuce modules that your project is going to manage. If in doubt, select all the
files.
You then have the choice between simply adding these files to your project, or to add them as links
(the
Add
button is in fact a scroll-down menu). In the first case, Visual Studio copies the selected
files into your project. In the second case, Visual Studio simply keeps a link on the original files. We
recommend you to use links, which makes updates of the library much easier.
1
http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-basic-express
2
www.yoctopuce.com/EN/libraries.php
3
The sources of this DLL are available in the C++ API
www.yoctopuce.com
73
Summary of Contents for Yocto-GPS
Page 1: ...Yocto GPS User s guide...
Page 2: ......
Page 6: ...22 Characteristics 557 Blueprint 559 Index 561...
Page 10: ...4 www yoctopuce com...
Page 14: ...8 www yoctopuce com...
Page 18: ...12 www yoctopuce com...
Page 22: ...16 www yoctopuce com...
Page 38: ...32 www yoctopuce com...
Page 42: ...36 www yoctopuce com...
Page 54: ...48 www yoctopuce com...
Page 72: ...66 www yoctopuce com...
Page 92: ...86 www yoctopuce com...
Page 122: ...116 www yoctopuce com...
Page 132: ...126 www yoctopuce com...
Page 564: ...22 Characteristics 558 www yoctopuce com...
Page 565: ......
Page 566: ......