Template:PT3 VBNET WIN MONO: Difference between revisions
From Phidgets Support
(Created page with "<div class="phd-slide-deck" data-deck="PT3_VBNET_WIN_MONO"> <div class="phd-slide-deck-header"><h3>Language - VB.Net</h3></div> <div class="phd-slides"> <div class="phd-slide"...") |
No edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<div class="phd-slide-deck" data-deck="PT3_VBNET_WIN_MONO"> | <div class="phd-slide-deck" data-deck="PT3_VBNET_WIN_MONO"> | ||
<div class="phd-slide-deck-header"><h3>Language - VB | <div class="phd-slide-deck-header"><h3>Language - VB</h3></div> | ||
<div class="phd-slides"> | <div class="phd-slides"> | ||
<div class="phd-slide"> | <div class="phd-slide"> | ||
Line 10: | Line 10: | ||
</div> | </div> | ||
<div class="phd-panel phd-flex-column-align-left phd-flex-column-justify-top"> | <div class="phd-panel phd-flex-column-align-left phd-flex-column-justify-top"> | ||
<p>Welcome to using Phidgets with Visual Basic | <p>Welcome to using Phidgets with Visual Basic! By using Visual Basic, you will have access to the complete Phidget22 API, including events.</p> | ||
<p>Mono is an open-source programming environment that aims to make Microsoft .NET applications available across all operating systems.</p> | <p>Mono is an open-source programming environment that aims to make Microsoft .NET applications available across all operating systems.</p> | ||
</div> | </div> | ||
Line 21: | Line 21: | ||
<p>First, make sure you have the following installed:</p> | <p>First, make sure you have the following installed:</p> | ||
<p>● Phidgets Drivers for Windows | <p>● <span>[https://www.phidgets.com/docs/OS_-_Windows Phidgets Drivers for Windows]</span></p> | ||
<p>● <span>[http://www.mono-project.com/download/ Mono]</span></p> | <p>● <span>[http://www.mono-project.com/download/ Mono]</span></p> | ||
Line 31: | Line 31: | ||
<p> | <p> | ||
The Phidget22.NET library is now available on nuget.org <span>[https://www.nuget.org/packages/Phidget22.NET/ here]</span>. Nuget is the recommended way to | The Phidget22.NET library is now available on nuget.org <span>[https://www.nuget.org/packages/Phidget22.NET/ here]</span>. Nuget is the recommended way to | ||
install and use the .NET library in Visual Studio | install and use the .NET library in Visual Studio. The nuget package adds targets for .NET Core and .NET Standard, so it should be usable from almost any .NET | ||
environment which also supports the C library. | |||
library. | |||
</p> | </p> | ||
</div> | </div> | ||
Line 41: | Line 40: | ||
<p> | <p> | ||
First, download and unpack the HelloWorld example for VB | First, download and unpack the HelloWorld example for VB. This example uses the <span>[https://www.phidgets.com/docs/Phidget_Manager Phidget Manager]</span> to | ||
<span>[https://www.phidgets.com/docs/Phidget_Manager Phidget Manager]</span> to list all Phidget channels that can be accessed by your computer: | list all Phidget channels that can be accessed by your computer: | ||
</p> | </p> | ||
Line 49: | Line 48: | ||
</p> | </p> | ||
<p><b>Note:</b> The HelloWorld example is compatible with Mono because it does not use Windows Forms. All other VB | <p><b>Note:</b> The HelloWorld example is compatible with Mono because it does not use Windows Forms. All other VB examples use Windows Forms.</p> | ||
</div> | </div> | ||
Line 91: | Line 90: | ||
<p>To download the code samples, visit this page:</p> | <p>To download the code samples, visit this page:</p> | ||
<p>● <span>[https://www.phidgets.com/?view=code_samples&lang=VBNET VB | <p>● <span>[https://www.phidgets.com/?view=code_samples&lang=VBNET VB Code Samples]</span></p> | ||
<p> | <p> | ||
Line 105: | Line 104: | ||
<p> | <p> | ||
The Visual Basic | The Visual Basic examples are derived from the Windows <span>[https://www.phidgets.com/docs/Phidget_Control_Panel Phidget Control Panel]</span>, so you'll need | ||
to modify a few things to adapt them for your own purposes. To begin with, you can remove the following line: | |||
</p> | </p> | ||
Line 171: | Line 170: | ||
</p> | </p> | ||
<p>Remember: your main reference for writing VB | <p>Remember: your main reference for writing VB code will be:</p> | ||
<p>● The <span>[https://www.phidgets.com/?view=api Phidget22 API]</span> documentation</p> | <p>● The <span>[https://www.phidgets.com/?view=api Phidget22 API]</span> documentation</p> | ||
<p>● The <span>[https://www.phidgets.com/?view=code_samples&lang=VBNET VB | <p>● The <span>[https://www.phidgets.com/?view=code_samples&lang=VBNET VB Example Code]</span></p> | ||
</div> | </div> | ||
Line 297: | Line 296: | ||
</p> | </p> | ||
<p>Enumerations with Phidgets in Visual Basic | <p>Enumerations with Phidgets in Visual Basic will take the form of <b>Phidget22.EnumerationType.Enumeration_Name</b>.</p> | ||
<p>For example, specifying a SensorType to use the 1142 for a voltage input would look like:</p> | <p>For example, specifying a SensorType to use the 1142 for a voltage input would look like:</p> |