Visual Basic.Net: A Beginner's Guide

Visual Basic.Net: A Beginner's Guide

by Jeff Kent


Members save with free shipping everyday! 
See details


Discover the essential truths of programming languages, and take advantage of the particular benefits of the Visual Basic .NET development environment. Understand fundamental programming concepts such as variables, operators, control structures, loops, procedures, and arrays, then incorporate these concepts into a sophisticated graphical user interface. Learn to combine rapid application development -- long a staple of Visual Basic -- with complete object-oriented programming support. Explore advanced topics such as debugging, file access, and databases. Visual Basic .NET: A Beginner's Guide will give you a complete working knowledge of Visual Basic .NET, an essential component of the Visual Studio .NET suite.

Product Details

ISBN-13: 9780072131208
Publisher: McGraw-Hill/OsborneMedia
Publication date: 02/26/2002
Series: Beginner's Guides Series
Pages: 452
Product dimensions: 7.50(w) x 9.25(h) x 0.91(d)

Table of Contents

Part 1Introduction to Visual Basic .NET
1What Is Visual Basic .NET?3
Visual Basic .NET Defined5
Visual Basic .NET Is a Programming Language5
Visual Basic .NET Is Used for Writing Windows Applications8
Windows Applications Are Gooey9
Windows Applications Are Event-Driven11
The Visual Basic .NET Programming Language Is Object-Oriented13
Programming with Class16
It's Not Just Visual Basic, It's Visual Basic .NET17
Mastery Check20
2Create A Visual Basic .NET Program Without Writing Code23
The .NET Framework25
Before You Install Visual Studio .NET26
Visual Studio .NET Versions27
Visual Studio .NET System Requirements27
Project 2-1Installing Visual Studio .NET28
Starting and Customizing Visual Studio .NET34
Project 2-2Creating a Windows Application38
The Code Behind the Scenes44
Class and Inherits Statements46
New Method47
Initialize Component Method48
Dispose Method50
Region Directive52
Mastery Check54
3Event Procedures, Properties, and Controls57
Event Procedures58
When Are Event Procedures Necessary?59
Using the IDE to Create an Event Procedure61
Writing Code Inside the Event Procedure64
Viewing and Changing Properties70
Using the Forms Designer to View and Change Properties71
Viewing and Changing Properties Through Code75
Adding Controls to the Form76
The Toolbox76
Copying the Control from the Toolbox to the Form79
Changing the Control's Size and Location Using the Forms Designer80
The Code Behind the Scenes81
Project 3-1Using the Label Control82
Mastery Check86
Part 2Programming Building Blocks: Variables, Data Types, and Operators
4Variables and Data Types91
Data Types92
Bits and Bytes94
Numeric Data Types96
Character Data Types100
Miscellaneous Data Types100
Default Values101
Option Explicit103
Option Strict105
Declaring a Variable108
Project 4-1Shared Variable114
Mastery Check122
5Assignment and Arithmetic Operators125
The Assignment Operator126
The Location of the Assignment Statement127
The Left Side of the Assignment Statement127
The Right Side of the Assignment Statement128
Type Conversions130
Widening Conversions130
Narrowing Conversions131
The Effect of Option Strict on Conversions133
Type Conversion Keywords133
Arithmetic Operators136
The Division Operators137
Concatenation Operators138
Type Conversions Revisited139
Operator Precedence141
Combining Arithmetic and Assignment Operators142
Project 5-1Change Machine Project143
The InputBox Function and Return Value145
The Algorithm147
Outputting the Result148
Mastery Check149
6Comparison and Logical Operators153
Comparison Operators155
Comparing Objects157
Comparing Strings158
Logical Operators163
The And Operator163
The AndAlso Operator164
The Or Operator165
The OrElse Operator166
The Xor Operator166
The Not Operator167
Mastery Check170
Part 3Controlling the Flow of the Program
7Control Structures175
If Statements176
The If...Then Statement177
The If...Then...Else Statement178
The IIf Function179
The If...Elself Statement180
Controls Used for If Statements182
CheckBox Control182
RadioButton Control182
Project 7-1Tuition Calculator183
The Select Case Statement190
Project 7-2Arithmetic Calculator193
Mastery Check197
8Loops and Arrays201
Loop Structures202
The For...Next Statement202
The While...End While Statement206
The Do Statement208
Declaring an Array212
Useful Array Functions, Properties, and Methods215
Resizing an Array217
The For Each...Next Statement219
Project 8-1Day of Week Calculator222
Mastery Check229
Types of Procedures232
Built-in vs. Programmer-defined Procedures233
Methods Contrasted233
Declaring a Subroutine235
Calling the Subroutine240
Declaring Functions245
Calling Functions248
More on Arguments251
Passing Arguments ByVal and ByRef251
Optional Arguments255
Parameter Arrays258
Procedure Overloading261
Project 9-1Calculator, Version 2264
Mastery Check268
Part 4The User Interface
10Helper Forms275
Message Boxes277
Project 10-1Message Boxes278
Dialog Boxes285
Project 10-2Dialog Box285
Owned Forms296
Project 10-3Owned Form297
Mastery Check308
11Menus and Toolbars311
Creating a Menu312
Add Functionality to the Menu Items318
Enhancing the Menu320
Disabling Items on Windows Forms Menus323
Context Menu324
Creating a Context Menu326
Adding Items to the Context Menu328
Add Functionality to the Menu Items333
Adding the Toolbar and Buttons335
Defining an Icon for a Toolbar Button339
Adding Functionality to the Toolbar343
Project 11-1Text Editor346
Mastery Check349
Part 5Error Handling and Prevention
12Structured Exception Handling and Debugging355
Structured Exception Handling357
Structured vs. Unstructured Exception Handling358
The Try...Catch...Finally Statement358
Project 12-1Illegal Division360
Exception Classes362
Break Mode366
Starting Debugging366
Controlling the Flow During Debugging374
Debugging Tools379
Mastery Check387
Answers to Mastery Checks389
Module 1What Is Visual Basic .NET?390
Module 2Create A Visual Basic .NET Program Without Writing Code391
Module 3Event Procedures, Properties, and Controls392
Module 4Variables and Data Type393
Module 5Assignment and Arithmetic Operators393
Module 6Comparison and Logical Operators394
Module 7Control Structures395
Module 8Loops and Arrays396
Module 9Procedures397
Module 10Helper Forms399
Module 11Menus and Toolbars400
Module 12Structured Exception Handling and Debugging401

Customer Reviews