How To Develop in Visual Basic

Microsoft's Visual Basic is one of the most popular programming languages in the world. With it you can create almost any type of application imaginable! Visual Basic is a RAD (rapid application development) environment. What this means is that Visual Basic has dozens of tools to help you create your application fast.

So, before we get started there is a little bit of history about Visual Basic (VB) that you should know. VB is an ever changing development environment. There have been versions of VB for DOS, Windows 16 bit environment (e.g. Windows 3.11), Windows 32 bit environments (e.g. Windows 95 and Windows 98) and for modern Windows environment (e.g. Windows XP and Windows Vista). What version of Windows you are running will dictate what version of Visual Basic you can use. For this article it will be assumed that you are running a modern version of Windows (XP Home, XP Pro, Windows 2000, etc.) and as such we will cover using Visual Basic.NET.   One of the nice things about developing with Microsoft's Visual Basic is that while the full developing environment can be expensive, Microsoft has consistently released free versions of VB for the hobbyist, student, or new developer. While these versions don't have all the "bells and whistles" of their expensive counterparts, they are more than adequate to get you started programming in Visual Basic. 

  1. Get a Free Copy of Visual Basic: The current version of Visual Basic is Visual Basic 2005 which is part of a larger collection of programming languages called Visual Studio 2005. The website for Visual Studio is http://msdn.microsoft.com/vstudio/. Since Microsoft's website can change often, you may want to use a search engine (e.g. Yahoo, Google, MSN, etc) to find the page by using the keywords "Visual Studio". Once there, look for Visual Studio Express; this is the free version of Microsoft's development languages. What we want is Visual Basic Express 2005 (the current direct website is http://msdn.microsoft.com/vstudio/express/vb). Once there, you can download your free copy of Visual Basic Express 2005. You will be given the default option of downloading a small (about 3 MB) set-up program that will use your internet connection to download the components you need. However, if you would like to download the complete package (about 450 MB) you can select the manual installation. This is a great option if you have access to a high speed internet connection and a CD burner. Both methods will work and in a short time you'll have the tools you need to get started.
  2. Get Comfortable With the Environment: Visual Basic has dozens of tools to help you write the program you want. However, all of these tools, menus, and options can be intimidating to a new user. Don't worry! Each toolbar, menu and wizard (a program to help you do a specific task) has a purpose and is there to help you spend your time being productive. But you don't have to know everyone of them when you're just beginning with Visual Basic.
  3. Become Familiar With the Types of Projects You Can Create: When you start the Visual Basic application, you will be greeted with a "Start Page". This page is just a place where you can get the latest news on Visual Basic (assuming you are connected to the internet). This is a nice feature, but does nothing for us as far as writing our program. If you click on the "New Project" icon in the toolbar (just hold your mouse over each icon to see what they are) or select the "New Project" option under the "File" menu, you will be presented with a new window prompting you for the type of program you want to write. The basic types included are as follows:
    • Windows Application. These applications are the type of programs that you are most familiar with; applications that run in Windows. Programs like Solitaire, Microsoft's Internet Explorer and Adobe's Acrobat Reader are examples of Windows applications. If you select this option, Visual Basic will add tools to the development environment to help you develop this type of program. This includes a powerful "visual" form editor so that you can "draw" how you want your program to look (but you still have to write code to make it do anything).

    • Class Library. With Visual Basic you can create libraries that you or other programmers can use. Let's say you have a collection of routines that you use over and over and over again. If you rewrite the routines every time you create a new program, you not only are wasting your time but could also introduce errors (we are all human). By putting commonly used bits of programming code into a library you not only save time and reduce the possibility of errors, but you can also share the library with friends and colleagues.
    • Console Application. Sometimes you don't need a graphical user interface (a GUI). Sometimes all you need is raw power and a simple, text-based interface. For those programs, a console application is the right tool!
    • Other Templates. Visual Basic Express 2005 comes with other templates include one to help you make a screensaver and a simple program to help you catalog your movies. But these are not the only template out there. On Visual Basic's website you can find templates and "Starter Kits" (templates with resources) to help you create everything from a card game to a time tracker for your business.

  4. Learn How to Program: With all of this talk about templates and form designers and starter kits, it is easy to forget that Visual Basic is a programming language. You can't do anything useful in Visual Basic without writing code. Unfortunately, one article is not enough to get anyone started programming. However, you have a wealth of tools to help you learn how to program at your fingertips thanks to the internet.
  5. The first, and maybe best, place to get started is at Visual Basic Express 2005's website (from above). On the site there are tutorials, tips and even videos (over 10 hours) to help you get started ... all free! Just click on the "Easy to Learn" link. Another great source of information that is often overlooked is Visual Basic itself. Within the help files are numerous tutorials that cover everything from working with Visual Basic's interactive development environment (IDE) to the creation of large projects. And when you really get stuck on how to do something, there are hundreds of newsgroups, forums and message boards full of people who are happy to help "newbies" (we were all beginners at one time or another). Simply use your favorite search engine to find a forum you like, or use the Community "Ask a Question" feature built into Visual Basic Express!

  6. Write Code: This simple step is often overlooked by new programmers. The thinking tends to be "I read it, so I get it." The old adage, "Practice makes perfect," is just as true in the realms of programming as in any other task you are trying to learn. Get in there, write code, and make a mistake ... that's how you learn.

This should get you started developing in Visual Basic. Don't forget that there is a world of people out there to help you.  

Good luck and enjoy! 

Note: For those that are using an older version Windows (e.g. Windows 98), don't worry! You can still learn Visual Basic. Microsoft released two other free versions of Visual Basic -- Visual Basic 2 Learning Edition (suitable for 16 bit systems) and Visual Basic 5 Control Creation Edition (CCE) (suitable for 32 bit systems). While Microsoft no longer supports these versions, a search with your favorite search engine should turn up places where you can still get these useful tools.  Another option is to check used software stores (both online and physical). With the release of Visual Basic.NET, these older versions (Visual Basic DOS and Visual Basic versions 1 - 6) can often be found for very reasonable prices!

 

Share this article!

Follow us!

Find more helpful articles: