Microsoft Visual Basic / Visual Studio
Visual Studio is Microsoft's flagship development product. It is an integrated development environment (IDE) designed theoretically to work with any programming language. It was originally most associated with Java (Microsoft's now discontinued J++ language), C++, and Visual Basic.
Over the years, the number of languages has increased to support even Python and Ruby. But today it is used primarily with C# and Visual Basic .NET (VB.NET).
What's in Visual Studio
The IDE is designed such that there isn't much need to work outside of it. It includes the following basic elements:
- Source Code Editor.
- Windows Forms: GUI class library, similar to MFC.
- Web Editor: a drag-and-drop approach to creating webpages.
- Class Designer: a visual based tool for creating new classes.
- Database tools: a graphical tool for creating database schemas.
There are many other parts that can be used with Visual Studio. Of particular interest is Team Explorer, which allows different programmers using Visual Studio to collaborate using the Microsoft revision control system.
Everyone old enough remembers what BASIC was. It was first developed in 1964 for mainframe computers — based on the early FORTRAN language. The language was made free and so soon it was everywhere, most especially on college campus computers, where BASIC was used to write some of the popular text based games of the time like Mike Mayfield's Star Trek.
When personal computers arrived on the scene, BASIC was an obvious language to include because it was simple to use. In fact, Bill Gates and Paul Allen got their start writing a BASIC interpreter, which they leveraged into writing the operating system for the new IBM PC. Similarly, the Commodore 64 used an operating system that was little more than a BASIC interpreter. The BASIC code of that time looked something like this:
10 LET N = 0
20 LET N = N + 1
30 PRINT N
40 IF N = 8 THEN GOTO 60
50 GOTO 20
It did have the advantage of being very clear. Most people without any programming experience can figure out what it does. Over time, BASIC became something of a joke in the computer world. But even during that time, things were changing. For one thing, BASIC because Basic. Gone were the line numbers, in were real functions. And Basic compilers showed up on the scene — things like Borland's Turbo Basic. But this was the tailing end of the technology trend. With the rise of compiled languages like Pascal and C, BASIC became relegated to hobbyists — and just the beginners at that.
Visual Basic changed all that. It came out in 1991. It seems that Microsoft had originally thought of it as a hobbyist language — even if a far more cool one than those that had come before. At first it was used as something of a semi-professional tool by people in small businesses who needed specialized software. By 1996, Microsoft released VBScript, which allowed people to automate things like Office applications — a great improvement over traditional macro languages. And then things really changed.
Visual Basic .NET
In 2001, Microsoft released Visual Basic .NET. It is one of two languages (the other being Visual C#) that have been built specifically to work with the .NET Framework. It is basically a class library that makes creating Windows based applications much more easy than they would normally be.
To be honest, Visual Basic doesn't look much like the original BASIC language. Over the last two decades, there has been a strong tendency for all languages to start to look alike. But Visual Basic does maintain a very straightforward syntax that is easy to write and to understand. Here's an example from the Microsoft Developer Network (note that anything following an apostrophe is a comment):
' Allow easy reference to the System namespace classes.
' This module houses the application's entry point.
Public Module modmain
' Main is the application's entry point.
' Write text to the console.
Console.WriteLine ("Hello World using Visual Basic!")
Visual Basic Versions
Visual Basic has been through a lot of versions, and the numbering is a bit confusing because versions are referred to both as their number and their year. Here is a general overview:
- V01 (1991): It was the first version of the product. The following year, Visual Basic for DOS was released, but it was actually the newest version of Microsoft's IDE QuickBASIC and not actually compatible with the Windows version.
- V02 (1992): It was mostly a cosmetic upgrade with increased speed.
- V03 (1993): This version introduced the Jet Database Engine.
- V04 (1995): This was the first version that could create 32-bit applications. It also replaced VBX with OLE controls.
- V05 (1997): It was the first 32-bit only version of Visual Basic. It allowed users to create ActiveX controls.
- V06 (1998): This version supported the creation of client and server side web applications and many new database functions including full support of ActiveX Data Objects.
- V07 (2002): This was the first .NET version of Visual Basic based on the .NET Framework 1.0.
- V08 (2005): This version solidified Visual Basic as a .NET language. In keeping with this, the ".NET" was dropped from its name so that it was "Visual Basic" just as C# was simply referred to as "C#."
- V09 (2008): This was an upgrade that went along with .NET Framework 3.5.
- V10 (2010): This update brought Visual Basic more in line with C#.
- V11 (2012): This version introduced asynchronous computing and updated to .NET Framework 4.5.
- V12 (2013): This version was basically just Visual Basic 11 with Visual Studio 2013.
- V13 (201?): This version was skipped by Microsoft to make the numbering of Visual Basic and Visual Studio the same.
- V14 (2015): This is the newest version of Visual Basic and the first to be open source.
In general, if you are going to developing Visual Basic applications, you will be using Visual Studio. The two go together. However, getting exactly the tools that are used in these tutorials may be difficult. In general, it shouldn't be a problem using different versions given that these resources are dealing with the core facilities of both the language and the IDE.
- Getting Started with Visual Basic: Microsoft's page of links for getting started with Visual Basic using Visual Studio 2015.
- Visual Basic .NET Tutorials: a great introduction to Visual Basic, the .NET framework, and Visual Studio.
- Visual Basic 6 Tutorial: a good introduction to Visual Basic 6, but it also includes links to tutorials for all versions from 9 (2008) through 14 (2015).
- Getting Started With Visual Basic 2008 (pdf): the first chapter of Evangelos Petroutsos' book, Mastering Microsoft Visual Basic 2008.
- Microsoft Visual Basic Tutorials: a couple hundred very clear tutorials on Visual Basic and related subjects.
- Free VB .NET Course: a thorough introduction to Visual Basic that doesn't assume any prior knowledge.
- How To Start Programming: a series of 56 short videos which take you from downloading Visual Basic 2008 to concepts like exceptions and classes.
- VB.Net Tutorial: a basic tutorial that is quite thorough.
Visual Basic is such a vast subject that it is impossible for any resource to deal with all elements of it. But the following will get you started with some more advanced aspects of the language once you master the basics.
- Microsoft's Visual Basic Page: contains links to a tremendous amount of information for Visual Basic with Visual Studio 2015.
- Tutorials Point: various tutorials, some of them basic but others more advanced.
- Free Tutes Advanced VB6 Tutorial: although pre-.NET, these tutorials deal with a lot of important things like COM and ActiveX Controls. They also have .NET tutorials.
- Net-informations.com Visual Basic .NET: contains loads of basic tutorials, but more important, advanced topics like ADO.NET and GUI programming.
- FunctionX Visual Basic .NET Page: tutorials on all parts of Visual Basic along with a number of advanced examples.
- C# Corner's Visual Basic .NET: advanced Visual Basic examples. Quite interesting!
- Object Oriented Programming In VB.NET: a Visual Basic tutorial with the focus on its object oriented natural. Probably not a good choice as a first introduction to the language.
- Wonder How To VB.NET: Visual basic examples demonstrated with videos.
There is a tremendous literature on Visual Basic and Visual Studio. Many of the following books are parts of a series, and may have editions for earlier versions of the system if that is what you are using. But as with the basic tutorials, you will generally be okay using a resource that isn't specific to what you are using.
- Beginning Visual Basic 2015 by Bryan Newsome: geared toward people who are totally new to programming. This book has editions going back to Visual Basic 2008.
- Visual Basic 2015 in 24 Hours by James Foxall: an introduction to Visual Basic from the very beginning. This book has editions going back to Visual Basic 2005.
- Learning Visual Basic .NET by Jesse Liberty: an old book, but still an excellent introduction to the Visual Basic programming language.
- Professional Visual Basic 2012 and .NET 4.5 Programming by Sheldon et al: thorough introduction with a number of advanced topics.
- Visual Studio 2015 For Beginners by Lewis Edwards: a very short introduction to Visual Studio.
- Professional Visual Studio 2015 by Bruce Johnson: the ultimate reference for everything that Visual Studio can do. It starts at the beginning and covers everything. It is also available in 2012 and 2013 editions.
Visual Studio provides all the tools that you would normally need. But there are various add-ons and extensions that you might find useful under some circumstances.
- Visual Basic 6 Quick Reference: a basic reference on a single sheet of paper — handy for pinning to the wall.
- Development Tools and Languages: links to all of Microsoft's development tools including Visual Studio and SDKs.
- Visual Basic Tools for Visual Studio: a service that allows you to code classic Visual Basic inside the most recent versions of Visual Studio.
- MZ-Tools: a commercial Visual Studio add-on that offers customizable code templates, specialized designers, and much more.
Visual Basic and Visual Studio are very big subjects. If you are programming in a Windows environment, they provide you with the power to do whatever you want. Using the resources presented here, you can get started and go a long way. You just need to dive in.