VB.net and Visual Studio 2008

For my latest project, I got a chance to use Visual Studio 2008 to create a Windows application in the vb.net language. After learning my way around the interface, I was off and running at the speed of light.

My previous encounters with Visual Basic were with Visual Basic 6.0  and the VB macro editor that comes with built into Microsoft Office 2002. So I have hardly come to this with no experience, however it is true to say that without much effort and a quick tutorial, even beginners can achieve quite interesting things.

For those that aren’t familiar with it, VB.net is an evolution of the Visual Basic language created by Microsoft. It includes a whole new set of .net framework class libraries, as well as the most of the traditional class libraries.  VB.net is used for both offline and online applications. For this article, I’m interested only in the traditional Windows “forms” application.

The Visual Editor:

Screenshot of the visual editor

As the name suggests, Visual Basic involves a visual component, which is the graphical forms editor. This allows you to add components to the forms space, such as buttons, text boxes, scroll bars, labels etc, and then you code in the interactions between these components. At the side of the editing area is a properties box, which lists all the various properties that dictate the behavior of those components.

Visual Studio functions much the same as Visual Basic 6.0 in regards to the visual editor.

When I first learnt to use Visual Basic, I picked it up very fast because it was more or less intuitive. What made it very easy to achieve things that I had not even learnt, but only imagined, was one of the program’s great features:

The Object Browser:

Object Browser

The object browser contains a browse-able list of class libraries that you can use. Looking through the list, you can get an idea of what can be achieved with Visual Basic, and can browse the syntax and required objects/parameters for various functions. It is important to note that some sub-classes and operations are not shown in the browser.

User Friendliness:

One of my more favourite features in Visual Studio (and its’ predecessors) is the drop down auto-complete list.

Visual Basic is an object oriented language, and the objects are elaborated through the . (dot). For example, to reference a parameter “height” of a text box named “txtBox”, we would refer to it as txtBox.height

The auto-complete list will pop up when I type the . (dot), and list all those properties that I may choose from. Height would be found within it, and have an icon that represents that it is a property.

Drop-down box

Also found within the auto-complete list, are functions. These have different icons. Examples of these would be show(), hide(), close()

Page 1 of 2 | Next page