full visual basic lesson

9
Basic) CHAPTER 2 - Do It Yourself Designing (Designing Interfaces) CHAPTER 3 - The Secret Code (Assignment Statements) CHAPTER 4 -Where Can I Store This? (Variables and Constants) CHAPTER 5- What’s Wrong with It? (Syntax and Logic Errors) CHAPTER 6-Decisions, Decisions, Decisions (Selection Structure) CHAPTER 7 -So Many Paths . . . So Little Time (Multiple- Alternative Selection Structures) CHAPTER 8 - Testing, Testing . . . 1, 2, 3 (Selecting Test Data) CHAPTER 9 - How Long Can This Go On? (Pretest Loops) CHAPTER 10 - Do It, Then Ask Permission (Posttest Loops) CHAPTER 11 - Let Me Count the Ways (Counter-Controlled Loops) CHAPTER 12 - I’m on the Inside; You’re on the Outside (Nested Loops) CHAPTER 13 - I Hear You Are Breaking Up (Sub Procedures) CHAPTER 14 - Talk to Me (Function Procedures) CHAPTER 15 - A Ray of Sunshine (One-Dimensional Arrays) CHAPTER 16- Building Your Own Structure (Structures) CHAPTER 17-The String Section (String Manipulation) CHAPTER 18 - I Love This Class (Creating a Class) CHAPTER 19 - Getting “Web-ified” (Web Applications) Visual Basic Course Outline

Upload: phoebie-marie-reyes

Post on 21-Jul-2016

245 views

Category:

Documents


1 download

DESCRIPTION

Lesson

TRANSCRIPT

Page 1: Full Visual Basic Lesson

CHAPTER 1- I Need a Tour Guide (Introduction to Visual Basic) CHAPTER 2 - Do It Yourself Designing (Designing Interfaces)CHAPTER 3 - The Secret Code (Assignment Statements)CHAPTER 4 -Where Can I Store This? (Variables and Constants)CHAPTER 5- What’s Wrong with It? (Syntax and Logic Errors)CHAPTER 6-Decisions, Decisions, Decisions (Selection Structure)CHAPTER 7 -So Many Paths . . . So Little Time (Multiple-AlternativeSelection Structures)CHAPTER 8 - Testing, Testing . . . 1, 2, 3 (Selecting Test Data)CHAPTER 9 - How Long Can This Go On? (Pretest Loops)CHAPTER 10 - Do It, Then Ask Permission (Posttest Loops)CHAPTER 11 - Let Me Count the Ways (Counter-Controlled Loops)CHAPTER 12 - I’m on the Inside; You’re on the Outside (Nested Loops)CHAPTER 13 - I Hear You Are Breaking Up (Sub Procedures)CHAPTER 14 - Talk to Me (Function Procedures) CHAPTER 15 - A Ray of Sunshine (One-Dimensional Arrays) CHAPTER 16- Building Your Own Structure (Structures)CHAPTER 17-The String Section (String Manipulation)CHAPTER 18 - I Love This Class (Creating a Class)CHAPTER 19 - Getting “Web-ified” (Web Applications)

Visual Basic Course Outline

Page 2: Full Visual Basic Lesson

Introduction to Visual Basic

User interface - is what appears on the screen, and with which you interact, while using a program. In this book, you will create the user interfaces for your programs using the tools available in Visual Basic 2010.

Integrated development environment (IDE)- is an environment that contains allof the tools and features you need to create, run, and test your programs.

Page 3: Full Visual Basic Lesson

Introduction to Visual Basic

To start Visual Studio 2008 or Visual Basic 2010 Express:1. Click the Start button on the Windows 7 taskbar and then point to All Programs.2. If you are using Visual Studio 2010, click Microsoft Visual Studio 2010 on the AllPrograms menu and then click Microsoft Visual Studio 2010. If the Choose DefaultEnvironment Settings dialog box appears, click Visual Basic Development Settingsand then click Start Visual Studio.If you are using Visual Basic 2010 Express, you will need to either click Microsoft VisualBasic 2010 Express on the All Programs menu or click Microsoft Visual Studio 2010Express on the All Programs menu and then click Microsoft Visual Basic 2010 Express.3. Click Window on the menu bar, click Reset Window Layout, and then click the Yesbutton. When you start Visual Studio 2010 Professional, your screen will appear similarto Figure 3-1. When you start Visual Basic 2010 Express, your screen will appear similarto Figure 3-2. As both figures indicate, the startup screen contains the Start Pagewindow, Toolbox window, and Solution Explorer window. The startup screen in VisualStudio 2010 Professional also contains the Team Explorer window.

Start Page window Solution Explorer window

Toolbox window’s tab

Team Explorer window’s tab

Page 4: Full Visual Basic Lesson

Creating user interface

The Windows Form Designer window is where you create (or design) your application’suser interface. The designer window shown in Figure 3-8 contains a Windows Form object,or form. A form is the foundation for the user interface in a Windows application. A formautomatically includes a title bar that contains a default caption—in this case, Form1—aswell as Minimize, Maximize, and Close buttons. At the top of the designer window is atab labeled Form1.vb [Design]. [Design] identifies the window as the designer window.Form1.vb is the name of the file on your computer’s hard disk (or on the devicedesignated by your instructor or technical support person) that contains the Visual Basicinstructions associated with the form.

Page 5: Full Visual Basic Lesson
Page 6: Full Visual Basic Lesson
Page 7: Full Visual Basic Lesson

Pet Application Output

Page 8: Full Visual Basic Lesson

Creating user interface

The Windows Form Designer window is where you create (or design) your application’suser interface. The designer window shown in Figure 3-8 contains a Windows Form object,or form. A form is the foundation for the user interface in a Windows application. A formautomatically includes a title bar that contains a default caption—in this case, Form1—aswell as Minimize, Maximize, and Close buttons. At the top of the designer window is atab labeled Form1.vb [Design]. [Design] identifies the window as the designer window.Form1.vb is the name of the file on your computer’s hard disk (or on the devicedesignated by your instructor or technical support person) that contains the Visual Basicinstructions associated with the form.

Page 9: Full Visual Basic Lesson