Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Using C# drivers in VB.NET


  • Please log in to reply
2 replies to this topic

#1 Stefan

Stefan

    Moderator

  • Members
  • PipPipPip
  • 1965 posts
  • LocationBreda, the Netherlands

Posted 14 June 2011 - 06:48 PM

Because Visual Basic-support for the .NET Micro Framework is very new, there are not many drivers available yet for Visual Basic.

Still, if you want to program in this lovely programming language, it is quite possible to combine your VB-code with C# drivers! For example, the attached project combines the wonderful LCD-class from http://geekswithblog...id_crystal.aspx with VB.NET.

How to proceed?
Step 1: Create your VB-project
Step 2: Click on File -> Add -> Existing Project
Step 3: Select the C# project and click on the Open-button
Step 4: Right-click on your VB-project in the Solution Explorer window and select "Add Reference"
Step 5: Go to the Projects-tab, select the C# project and click OK

That's all folks!

Now you can use C# drivers in the wonderful world of Visual Basic! :D

Posted Image

Attached Files


"Fact that I'm a moderator doesn't make me an expert in things." Stefan, the eternal newb!
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs

#2 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 14 June 2011 - 06:49 PM

Nice! I hadn't even thought about that... Yes, you can certainly compile C# drivers as DLLs and then import them into your VB projects! Thanks, Stefan. Chris

#3 GDSever

GDSever

    Advanced Member

  • Members
  • PipPipPip
  • 81 posts
  • LocationNewark, DE

Posted 15 June 2011 - 04:52 PM

Two big thumbs up on this - I use the Micro LCD library in one of my projects, and this is good stuff!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.