Visual Basic aulia nm History and Evolution Visual

Visual Basic aulia nm


History and Evolution – Visual Basic 1. 0 for DOS was released in September 1992. The interface was textual, using extend ASCII characters to simulate the appearance of a GUI. – Visual Basic 2. 0 was released in November 1992. The programming environment was easier to use, and its speed was improved.

History and Evolution – Visual Basic 3. 0 was released in the summer of 1993 and came in Standard and Professional versions. – Visual Basic 4. 0 (August 1995) was the first version that could create 32 -bit as well as 16 -bit Windows programs. It also introduced the ability to write non-GUI classes in Visual Basic.

History and Evolution – Visual Basic 5. 0 (February 1997), Microsoft released Visual Basic exclusively for 32 -bit versions of Windows. – Visual Basic 6. 0 (Mid 1998) improved in a number of areas, including the ability to create web-based applications. – Visual Basic. NET (2002) (VB 7) – Microsoft released VB. NET along with C# which received most of the attention

History and Evolution – Visual Basic. NET (2003) (VB 7. 1) – Improvements were made in the performance and reliability of the. NET IDE – Visual Basic 2005 (VB 8. 0) – Microsoft dropped the. NET portion of the title. Many improvements were made to reinforce Visual Basic. NET as a rapid application development platform and further differentiate it from C#.

History and Evolution – Visual Basic 2008 (VB 9. 0) – released with the Microsoft. NET Framework 3. 5 on November 19, 2007. Release included: – True ternary operator If(boolean, value) to replace IIF function – Lambda expressions – XML Literals – Type Interface

VB is the best visual program applications that has high language program and easily to learn. Program Language that used in VB is based on desktop and Basic Language (Beginners All Purpose Symbolic Instruction Code). Visual Basic is the easiest high level language program by GUI (Graphical User Interface) application.


Visual basic can be downloaded from Microsoft. (www. visualstudio. com/downloads/) Microsoft created this application (visual basic) that is named as Visual Studio and also as IDE program (Integrated Development Environment Program). Visual Basic uses. Net Framework as database default that belongs to the system which is called as SQL Server.


This program allows us as a user, to create graphic and visualization of application Microsoft Visual Basic also provides us to control a hardware that can be used to create a lot of form of application program It also gives us modern feature that allow us : to create some codes, to test it, and to run a single program or sometimes a following program that related with an application



Compared to C# and Java C# AND Java Visual Basic int i; double d; String s; dim i As Integer dim d As Double dim s As String if(a == b){ //Code } else{ //Code } if a = b then ‘Code else ‘Code end if public class Hello{ //Code } Public Class Hello ‘Code End Class E



Information presentation – Elementary unit of information in computer is a bit (0 or 1). – A group of 8 bits is called a byte. – Using a byte it is possible to present 28 = 256 values. – Data types of variables exist because number of combinations with which to present information is limited.

Data Types – A data type specifies the type of data that is assigned to a variable or constant – Two primary types of data in VB – numeric and string – Numeric data can be used in arithmetic operations – String data should not be used in arithmetic – Numeric data types can be subdivided into specific types: - currency - single - double $55, 567. 78129086 - integer 255 - long (integer) - Boolean 35, 455 True or False

Data types Numeric Range Data Type Precision Integer -32, 768 to 32, 767 Long -2, 147, 483, 648 to 2, 147, 483, 647 January 1, 100 to December 31, 9999 True or False Whole numbers Not applicable Date Boolean Numbe r of Bytes 2 4 8 2

Data types Numeric Range Data Type Single 1. 4 E-45 to 3. 4 E 38 and -3. 4 E 38 to -1. 4 e-45 Double 4. 9 E-324 to 1. 8 E 38 and -1. 8 E 308 to -4. 9 E-324 Currency -922, 337, 203, 685, 477. 5808 to 922, 37, 203, 685, 477. 5807 Precision Number of Bytes Seven significant digits Fifteen significant digits 4 4 places to right of decimal 8 8

Data types Numeric Data Type String (variable length) String (fixed length) Variant Range Precision N/A N/A adjusted Number of Bytes 10 bytes+length of string Length of string 8

Integer Variables – Store integers between -32, 768 and 32, 767 – Require no decimal point – If the number is outside of the range Use the Long data type

Long Integer Variables – Used to store integers between -2, 147, 483, 648 and 2, 147, 483, 647 – Must be used whenever an integer number exceeds the range for the Integer type

Single Precision Variables – Represents numbers which have both a whole and a fractional part – Used to store values ranging in value from -3. 402823 E 38 to -1. 401298 E-45 for negative values and from 1. 401298 E-45 to 3. 402823 E 38 for positive values – Can store numbers with greater precision than integers

Double-Precision Variables – Store large floating point numbers, but require twice as many bytes of storage compared to type Single – Stored as floating-point numbers ranging in value from 1. 79769313486232 E 308 to - 4. 94065645841247 E-324 for negative values and from 4. 94065645841247 E-324 to 1. 79769313486232 E 308 for positive values

Single vs. Double – Use Single unless the calculation requires greater precision – Not only does Double take more memory to store, but it also requires more time to run than type Single

Boolean Variables – Can be used whenever a variable may have one of only two possible values - True or False, Off or On, etc. – Frequently used in statements which require a test of whether something is true or false.

String Variables – Can hold any character, word, or phrase that the keyboard can produce. – In VB there are two kinds of string variables: – Variable-length: Stings in which the number of characters in the string is not specified in advance. – Fixed-length: Strings in which the number of characters in the string is specified in advance

Subroutines Procedures that perform certain sequences of actions. Described in module windows. Start with the key word Sub, then follows the name of the subroutine and the list of parameters in one line. The list of parameters may be empty. Terminated by End Sub statement. Sub Name(parameters) Statements End Sub

Functions Procedures that perform certain sequences of actions and return some value as a result. Described in module windows. Start with the key word Function, then follows the name of the function, the list of parameters, and the type of returned value in one line. The list of parameters may be empty. Terminated by End Function statement. Function Name(parameters) As Datatype Statements End Function

Use of subroutines and functions – Both the subroutines and functions are described in the module windows. – They are separated with straight lines. – No statements can appear between subroutines and functions except comments. – If they are in the This. Document module of a Word document, they are available in the current document and copied together with the current document. – If they are in a separate module, they are available to all documents on the current computer, but are not copied together with the document. – Excel has modules associated with particular sheets.

Use of subroutines and functions – Both functions and subroutines can be called and debugged in the Immediate window. – They can be called inside other functions and subroutines. – A function is not just called. Its return value is used in some expression. – A function can be used on a worksheet. – A subroutine can represent a macro.

s/n: 5890 -1530525
- Slides: 34