Thursday, January 28, 2010

==Language features==

Like the BASIC programming language, Visual Basic was designed to be easy to learn and use. The language not only allows programmers to create simple GUI applications, but can also develop complex applications. Programming in VB is a combination of visually arranging components or controls on a form, specifying attributes and actions of those components, and writing additional lines of code for more functionality. Since default attributes and actions are defined for the components, a simple program can be created without the programmer having to write many lines of code. Performance problems were experienced by earlier versions, but with faster computers and native code compilation this has become less of an issue.


Although programs can be compiled into native code executables from version 5 onwards, they still require the presence of runtime libraries of approximately 1 MB in size. This runtime is included by default in Windows 2000 and later, but for earlier versions of Windows like 95/98/NT it must be distributed together with the executable.

Forms are created using drag-and-drop techniques. A tool is used to place controls (e.g., text boxes, buttons, etc.) on the form (window). Controls have attributes and event handlers associated with them. Default values are provided when the control is created, but may be changed by the programmer. Many attribute values can be modified during run time based on user actions or changes in the environment, providing a dynamic application. For example, code can be inserted into the form resize event handler to reposition a control so that it remains centered on the form, expands to fill up the form, etc. By inserting code into the event handler for a keypress in a text box, the program can automatically translate the case of the text being entered, or even prevent certain characters from being inserted.

Wednesday, January 27, 2010

==Characteristics present in Visual Basic==

Visual Basic has the following traits which differ from C-derived languages:
* Multiple assignment available in C language is not possible. A = B = C does not imply that the values of A, B and C are equalled. The boolean result of "Is B = C?" is stored in A. The result stored in A could therefore be false(0) or true(-1)
* [[Boolean datatype|Boolean]] constant True has numeric value −1.In most languages, True is mapped to a non zero numeric value, often 1 or -1. This is because the Boolean data type is stored as a 16-bit signed integer. In this construct −1 evaluates to 16 binary 1s (the Boolean value True), and 0 as 16 0s (the Boolean value False). This is apparent when performing a Not operation on a 16 bit signed integer value 0 which will return the integer value −1, in other words True = Not False. This inherent functionality becomes especially useful when performing logical operations on the individual bits of an integer such as And, Or, Xor and Not.[http://vb.mvps.org/tips/Truth.asp Microsoft Basic Logical Expression Evaluation] This definition of True is also consistent with BASIC since the early 1970s Microsoft BASIC implementation and is also related to the characteristics of CPU instructions at the time.

Tuesday, January 26, 2010

==Evolution of Visual Basic==

VB 1.0 was introduced in [[1991]]. The drag and drop design for creating the user interface is derived from a prototype form generator developed by [[Alan Cooper]] and his company called ''Tripod''. Microsoft contracted with Cooper and his associates to develop Tripod into a programmable form system for Windows 3.0, under the code name ''Ruby'' (no relation to the [[Ruby (programming language)|Ruby programming language]]).

Tripod did not include a programming language at all. Microsoft decided to combine Ruby with the Basic language to create Visual Basic.

The Ruby interface generator provided the "visual" part of Visual Basic and this was combined with the "EB" Embedded BASIC engine designed for Microsoft's abandoned "Omega" database system. Ruby also provided the ability to load [[dynamic-link library|dynamic link libraries]] containing additional controls (then called "gizmos"), which later became the [[Visual Basic Extension|VBX]] interface{{cite web| url=http://www.forestmoon.com/BIRTHofVB/BIRTHofVB.html| title = The Birth of Visual Basic}}.