Presentation is loading. Please wait.

Presentation is loading. Please wait.

Visual Basic  Rick, Albert. 1. Visual Basic 1.0 (May 1991) was released for Windows at the Comdex/Windows World trade show in Atlanta, Georgia.1991 2.

Similar presentations


Presentation on theme: "Visual Basic  Rick, Albert. 1. Visual Basic 1.0 (May 1991) was released for Windows at the Comdex/Windows World trade show in Atlanta, Georgia.1991 2."— Presentation transcript:

1 Visual Basic  Rick, Albert

2 1. Visual Basic 1.0 (May 1991) was released for Windows at the Comdex/Windows World trade show in Atlanta, Georgia.1991 2. Visual Basic 1.0 for DOS was released in September 1992.it was actually the next version of Microsoft's DOS-based BASIC compilersDOS1992 3. Visual Basic 2.0 was released in November 1992. easier to use, and its speed was improved1992 4. Visual Basic 3.0 was released in the summer of 1993 and came in Standard and Professional versions.1993 5. Visual Basic 4.0 (August 1995) was the first version that could create 32-bit as well as 16-bit Windows programs.199532-bit16-bit 6. With version 5.0 (February 1997), Microsoft released Visual Basic exclusively for 32-bit versions of Windows.199732-bit 7. Visual Basic 6.0 (Mid 1998) improved in a number of areas [8] including the ability to create web-based applications1998 [8]

3 About VB  Visual Basic (VB) is the third-generation event-driven programming language and integrated development environment (IDE) from Microsoft for its COM programming model. Visual Basic is relatively easy to learn and use.third-generationevent-driven programming languageintegrated development environment MicrosoftCOM  Visual Basic was derived from BASIC and enables the rapid application development (RAD) of graphical user interface (GUI) applications, access to databases using Data Access Objects, Remote Data Objects, or ActiveX Data Objects,BASICrapid application development (RAD)graphical user interface (GUI)databasesData Access Objects Remote Data ObjectsActiveX Data Objects  A programmer can put together an application using the components provided with Visual Basic itself. Programs written in Visual Basic can also use the Windows API, but doing so requires external function declarations. componentsWindows API

4 VB environment

5 VB sample program Comments The Main procedure Input and output Sub Main(ByVal cmdArgs() As String) Function Main() As Integer Function Main(ByVal cmdArgs() As String) As Integer Sub Main()

6 Readability  Visual Basic is based on simplicity. Programmers use a few fundamental types of objects to build an application. -Good  VB requires user to prefix assignments on “objects” with Set. But if user try to put a Set in front of assignments on what VB considers primitives, user will get an error that reads “Object required: …….”. -Bad  VB consists of features and syntax borrowed from other languages -Bad

7 Writability  VB is easy to learn and write -Good  It can be used as a front end to SQL (or other databases) allowing the user to enhance the way they access their data. -Good  It can also be used to create ActiveX and COM components for use online or in desktop applications. -Good  VB is a "component integration language" which utilizes Microsoft's Component Object Model ("COM") that allows parts to be bolted onto programs easily. -Good

8 Reliability  It is not suited to complex modern programming techniques. -Bad  VB is an interpreted language which again slows the execution of your program down. -Bad  As you can control the checking and warning systems in VB it often enables the programmer to write code that is very difficult to troubleshoot when a bug arises. -Bad  The programs a programmer produces in VB are not portable and cannot be used on non- Windows systems. -Bad

9 Cost  Visual Basic can be purchased by itself. Visual Basic. Net is only sold as part of what Microsoft calls Visual Studio.NET. Visual Studio.NET also includes the other Microsoft supported.NET languages, C#.NET, J#.NET and C++.NET. Visual Studio comes in a variety of versions with different capabilities that go well beyond just the ability to write programs.  Fortunately, Microsoft also provides a completely free version of Visual Basic called Visual Basic.NET 2005 Express Edition (VBE).  In October 2006, Microsoft's posted list prices for Visual Studio.NET ranged from $800 to $2,800 although various discounts are often available.

10 Personal Programming  The term "Personal Programming" refers to the idea that, wherever you work, whatever you do, you can expand your computer's usefulness by writing applications to use in your own job.  Personal Programming is what Visual Basic is all about.

11 3-Step approach for creating programs VB presents a 3-step approach for creating programs:  Design the appearance of your application.  Assign property settings to the objects of your program.  Write the code to direct specific tasks at runtime.

12 Areas Visual Basic is Used Visual Basic is used in a number of different areas, for example:  Education  Research  Medicine  Business  Commerce  Marketing and Sales  Accounting  Consulting  Law  Science

13 Statements (Else-If Statement) Ex: Dim count As Integer = 0 Dim message As String If count = 0 Then message = "There are no items." ElseIf count = 1 Then message = "There is 1 item." Else message = "There are " & count & " items." End If

14 Statements (For...Next Statement) Ex: For index As Integer = 1 To 5 Debug.Write(index.ToString & " ") Next Debug.WriteLine("") ' Output: 1 2 3 4 5 This statement repeats a group of statements a 5 times.

15 Data Types String Variable Examples: This code is used to declare a string variable. Private Sub Form_Load() Dim City As String End Sub This code is used to initialize a variable after it's been declared. If you want its area of memory to be empty, you can assign it two double quotes. Private Sub Form_Load() Dim City As String City = "" End Sub

16 Data Types Boolean Boolean variables are values that can be only either True of False. To declare a Boolean variable, use the Boolean keyword. Private Sub Form_Load() Dim Married As Boolean End Sub You can initialize a Boolean variable by assigning it to either True or False after you declared it. Private Sub Form_Load() Dim Married As Boolean Married = False End Sub

17 Loops A Do loop repeats a block of statements while a Boolean condition is true or until the condition becomes true. Dim index As Integer = 0 Do While index <= 10 Debug.Write(index.ToString & " ") index += 1 Loop Debug.WriteLine("") ' Output: 0 1 2 3 4 5 6 7 8 9 10 For Loop Ex: Private Sub Form_Load() For i = 1 To 10 Step 1 Print "programmershelp" Next i End Sub

18 Program Examples Private Sub Form_Activate ( ) Print 20 + 10 Print 20 - 10 Print 20 * 10 Print 20 / 10 End Sub Output: 30 10 200 2

19 Private Sub A = Tom B = “likes" C = “to" D = “eat" E = “burger" Print A + B + C + D + E End Sub Private Sub A = Tom B = “likes" C = “to" D = “eat" E = “burger" Print A & B & C & D & E End Sub Output: Tom likes to eat burgers

20 Who uses Visual Basic?  Microsoft  Vertex  Banamex/Citigroup  Bill Gates developed a version of BASIC for the first microcomputer- the MITS Altair  Mega Corporations

21 Facts  Visual Basic is most highly utilized in the world of business programming.  Visual Basic was formerly known as "Project Thunder."  Visual Basic is rarely case sensitive.  A 2003 report says that fifty two percent of software developers made use of Visual Basic.

22 Reference  http://visualbasic.about.com/od/applicatio ns/a/whatisvb_2.htm  http://groups.engin.umd.umich.edu/CIS/c ourse.des/cis400/vbasic/vbasic.html  http://www.johnsmiley.com/visualbasic/v bhistory.htm  http://www.go4expert.com/forums/showt hread.php?t=3625  http://msdn.microsoft.com/en- us/library/752y8abs.aspx  http://msdn.microsoft.com/en- us/library/5z06z1kb.aspx  http://cuinl.tripod.com/tutorials/f-11.htm  http://www.programmershelp.co.uk/vbfor loops.php  http://www.thocp.net/biographies/gates_b ill.htm  http://www.instabriefs.com/computer- programming/visual-basic/visual-basic- fast-facts.php


Download ppt "Visual Basic  Rick, Albert. 1. Visual Basic 1.0 (May 1991) was released for Windows at the Comdex/Windows World trade show in Atlanta, Georgia.1991 2."

Similar presentations


Ads by Google