Recently, I have a question from one of the formal students about Integrated Development Environments for VB.NET. So I would like to introduce SharpDevelop IDE, a free and open source IDE.
There are not many tutorials about SharpDevelop and VB.NET. So this article can be used as another tutorial for VB.NET development using SharpDevelop.
Wikipedia has an article about SharpDevelop. The IDE is
- for multiple platforms: Microsoft .NET, Mono, GTK# and Glade#
- for multiple languages: VB.NET, C#, Ruby, Python and Boo
- being updated frequently since SharpDevelop 1.0 released in 2004
If your computer does not have SDK for Windows 7 and .NET, you can download it at http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=8279. SharpDevelop requires this framework.
SharpDevelop IDE download page is at http://www.icsharpcode.net/OpenSource/SD/Download/
Tutorial: Develop a Body Mass Index Application with VB.NET
Before we dwell into this tutorial, there are 3 readings that we may want to do
- For ones who need to refresh their knowledge of VB.NET, please visit http://msdn.microsoft.com/en-us/vstudio/hh388573
- There is a “Hello World!” tutorial by Matt Ward at http://community.sharpdevelop.net/blogs/mattward/pages/YourFirstVBNetProjectHelloWorld.aspx. This tutorial cover the basics of SharpDevelop
- Read about Body Mass Index at http://www.cdc.gov/healthyweight/assessing/bmi/
Step 1: Create a VB.NET-Windows-Application solution and name it as BMI-Calculator
Start SharpDevelop; click New solution and enter information as shown in below image.
Step 2: Design the main form
- Switch to Design mode, using Windows Forms tools; (view image below)
- Create 4 labels with names: lblWeight, lblHeight, lblResult and lblHl2
- Create 2 text boxes: txtWeight and txtHeight
- Create 1 button: btnCalc
Step 3: Specify subroutines for 3 events
- Specify calcBMI subroutine for the click event of btnCalc button
- Specify clearResult subroutine of the TextChanged event of txtWeight text box.
- Specify clearResult subroutine of the TextChanged event of txtHeight text box as well.
Step 4: write code for 2 subroutines: calcBMI and clearResult
- clearResult: click the source tab and enter 1 line code for clearResult as shown in the below
- Add code for calcBMI subroutine: please copy the code in this text file calcBMI and past it to calcBMI subroutine
Step 5: Save and Run
- Click Save and Click Run to test the application. Please note that this is a simple calculator; so we can add more code to make this application more solid but it is not the scope of this tutorial. Please revisit this site for my next article of how to create an installable file of this app
Here is the video clip about this tutorial