Beginning Visual Basic 2012

Beginning Visual Basic 2012

Bryan Newsome

Language: English

Pages: 744

ISBN: 1118311817

Format: PDF / Kindle (mobi) / ePub


The ultimate beginner's guide to programming in Visual Basic 2012

Visual Basic, used to write Windows applications and web apps with ASP.NET, is an essential language for beginning programmers. Using the time-tested Wrox approach, this guide provides a step-by-step format that gets beginners up and running quickly and confidently. Essential topics covered include writing Windows applications, working with dialog boxes and menus, object oriented programming techniques, programming for graphics, using Visual Basic with ASP.NET for web apps, and dealing with data access and SQL Server.

  • Visual Basic is a popular first language for beginning programmers; this Wrox beginner's guide covers all aspects of the newest version
  • Uses a basic, step-by-step approach to help beginners learn quickly and easily
  • Covers essential topics including flow control, data structure, writing Windows applications, error handling and debugging, objects and object oriented techniques, and class libraries
  • Explains Windows Forms, graphics programming, accessing databases, web programming using Visual Basic with ASP.NET, data access, SQL Server, ADO.NET, and XML

Beginning Visual Basic 2012 is a must-have for programming newcomers who want to get a solid footing in one of the most important programming languages.

 

 

 

 

 

 

 

 

 

 

 

 

is the Method Name combo box. If you expand this combo box, you will see a list of all defi ned functions and events for the object selected in the Class Name combo box. If this particular form had a lot of code behind it, these combo boxes would make navigating to the desired code area very quick— jumping to the selected area in your code. However, all the code for this project so far fits in the window, so there aren’t a lot of places to get lost. TRY IT OUT 1. Adding Code to the Hello User

into a native processor code targeted for the processor your computer is using. 3 Writing Software WHAT YOU WILL LEARN IN THIS CHAPTER ‰ Understanding algorithms ‰ Using variables ‰ Exploring different data types, including integers, floating-point numbers, strings, and dates ‰ Studying code scope ‰ Understanding debugging applications basics ‰ Understanding how computers store data in memory WROX.COM CODE DOWNLOADS FOR THIS CHAPTER The wrox.com code downloads for this chapter are

MessageBox.Show(dteChangedDate.ToLongDateString, "Date Demo") End Sub 2. Run the project and click the button. You’ll see three message boxes, one after another. The first message box displays the long date for 2/29/2400, whereas the second message box displays the long date for 8/28/2400. The final message box displays the long date for 2/28/2399. Storing Variables x 71 How it Works The Date data type supports several methods for manipulating dates. Here are three of them: 'Add a day and

'Declare variable and set value Dim strName As String strName = "Balthazar Keech" 'Display results MessageBox.Show(strName, "Scope Demo") End Sub When a method starts running, the variables defi ned within that method (in other words, between Sub and End Sub, or between Function and End Function) are given local scope. The scope defi nes which parts of the program can see the variable, and local specifically means within the current method. The strName variable technically doesn’t exist until the

conditions ‰ Nested If statements ‰ Comparison operators and the String.Compare method ‰ The Select Case statement to perform multiple comparisons ‰ For…Next and For…Each loops ‰ Do…Loop and Do While…Loop statements EXERCISES 1. When using a Select Case statement, how do you allow for multiple items in the Case statement? 2. What is the difference between a Do Until and a Loop Until Do loop? 3. Is “Bryan” and “BRYAN” the same string as Visual Basic sees it? 4. When you use the

Download sample

Download