Get on the fast track to professional application development with Visual Basic .NET 2003. This practical, hands-on tutorial expertly guides you through the fundamentals—using step-by-step exercises, code samples, optimization tips, and real-world advice to accelerate your productivity. Work at your own pace, learning core programming skills by selecting just the chapters and lessons you need. Upgrade your Visual Basic 6 applications quickly with the help of “Upgrade Notes” sidebars, a special upgrading index, and insights into the enhanced Visual Basic .NET Upgrade Wizard. It’s everything you need to start creating .NET-connected software now! Discover how to: · Create a compelling user interface with Toolbox controls, menus, and dialog boxes · Use methods in the .NET Framework 1.1 class libraries · Utilize the new debugging tools and structured error handlers to build robust code · Manage data in your programs using collections, arrays, and string processing techniques · Automate Microsoft Office applications and manage processes · Manage Windows® Forms and create graphics and animation effects · Use inheritance and other new object-oriented programming capabilities · Write custom code for printers and dialog boxes for printing · Manage Access databases and create custom database applications with Microsoft ADO.NET · Display HTML documents using Microsoft Internet Explorer · Use Web Forms to build Internet interfaces · Deploy Visual Basic .NET applications · Port Visual Basic 6 programs to Visual Basic .NET CD features: · Code examples in Visual Basic .NET 2003 · All the book’s practice files · Fully searchable eBook
Le informazioni nella sezione "Riassunto" possono far riferimento a edizioni diverse di questo titolo.
Michael Halvorson is the author or co-author of twenty computer books, including Microsoft Office XP Inside Out, Visual Basic 6 Professional Step By Step, Learn Microsoft Visual Basic 6 Now, Running Microsoft Office 2000 Premium Edition, and Microsoft Word 97/Visual Basic Step by Step. Michael earned a bachelor's degree in Computer Science from Pacific Lutheran University in Tacoma, Washington, and master’s and doctoral degrees in History from the University of Washington in Seattle, Washington. He was employed at Microsoft Corporation as a technical editor, acquisitions editor, and localization manager from 1985 to 1993. Michael currently spends his time developing innovative software solutions for Microsoft Office and Microsoft Visual Basic .NET, and teaching European history courses at colleges in the Pacific Northwest.
Acknowledgments xi
Introduction xiii
PART 1 GETTING STARTED WITH MICROSOFT VISUAL BASIC .NET 2003
CHAPTER 1 Opening and Running a Visual Basic .NET 2003 Program 3
The Visual Studio .NET Development Environment 5
The Visual Studio .NET Tools 10
The Windows Forms Designer 12
Running a Visual Basic Program 14
The Properties Window 16
Moving and Resizing the Programming Tools 20
Moving and Resizing Tool Windows in Visual Studio 21
Docking a Tool in Visual Studio 23
Hiding a Tool in Visual Studio 25
Getting Help 27
One Step Further: Exiting Visual Studio .NET 30
CHAPTER 2 Writing Your First Program 33
Lucky Seven: Your First Visual Basic .NET Program 34
Programming Steps 35
Creating the User Interface 35
Setting the Properties 42
The Picture Box Properties 47
Writing the Code 49
A Look at the Button1_Click Procedure 54
Running Visual Basic .NET Applications 56
Building an Executable File 58
One Step Further: Adding to a Program 60
CHAPTER 3 Working with Toolbox Controls 63
The Basic Use of Controls: The "Hello World" Program 64
Using the DateTimePicker Control 70
The Birthday Program 70
Controls for Gathering Input 77
The Input Controls Demo 80
Looking at the Input Controls Program Code 83
Using the LinkLabel Control 86
One Step Further: Installing ActiveX Controls 91
The Microsoft Chart Control 91
CHAPTER 4 Working with Menus and Dialog Boxes 95
Adding Menus Using the MainMenu Control 96
Adding Access Keys to Menu Commands 98
Processing Menu Choices 101
Using Dialog Box Controls 106
Changing the Object Names for Items on the File Menu 109
Disabling a Menu Command 110
Event Procedures That Manage Common Dialog Boxes 111
One Step Further: Assigning Shortcut Keys to Menus 118
PART 2 PROGRAMMING FUNDAMENTALS
CHAPTER 5 Visual Basic .NET Variables and Operators 125
The Anatomy of a Visual Basic Program Statement 127
Using Variables to Store Information 127
Setting Aside Space for Variables: The Dim Statement 128
Using Variables in a Program 129
Using a Variable to Store Input 133
Using a Variable for Output 136
Working with Specific Data Types 138
Constants: Variables That Don’t Change 144
Working with Visual Basic Operators 146
Basic Math: The +, –, *, and / Operators 146
Using Advanced Operators: \, Mod, ^, and & 150
Working with Math Methods in the .NET Framework 155
Operator Precedence 157
One Step Further: Using Parentheses in a Formula 158
CHAPTER 6 Using Decision Structures 161
Event-Driven Programming 162
Using Conditional Expressions 164
If…Then Decision Structures 165
Testing Several Conditions in an If...Then Decision Structure 165
Using Logical Operators in Conditional Expressions 170
Short-Circuiting by Using AndAlso and OrElse 172
Select Case Decision Structures 174
Using Comparison Operators with a Select Case Structure 176
One Step Further: Detecting Mouse Events 180
CHAPTER 7 Using Loops and Timers 185
Writing For…Next Loops 186
Displaying a Counter Variable in a TextBox Control 187
Creating Complex For…Next Loops 190
Opening Files Using a Counter That Has Greater Scope 193
Writing Do Loops 196
Avoiding an Endless Loop 197
The Timer Control 201
Creating a Digital Clock Using a Timer Control 201
One Step Further: Using a Timer Object to Set a Time Limit 204
CHAPTER 8 Debugging Visual Basic .NET Programs 209
Finding and Correcting Errors 210
Three Types of Errors 210
Identifying Logic Errors 212
Debugging 101: Using Break Mode 212
Tracking Variables by Using a Watch Window 218
Using the Command Window 220
Switching to Command Mode in the Command Window 222
One Step Further: Removing Breakpoints 223
CHAPTER 9 Trapping Errors Using Structured Error Handling 225
Processing Errors Using Try...Catch 226
When to Use Error Handlers 227
Setting the Trap: The Try...Catch Statement 228
Path and Disk Drive Errors 228
Writing a Disk Drive Error Handler 231
Using the Finally Clause to Perform Cleanup Tasks 232
More Complex Try...Catch Error Handlers 234
The Err Object 234
Specifying a Retry Period 238
Using Nested Try...Catch Blocks 241
Comparing Error Handlers with Defensive Programming Techniques 241
One Step Further: The Exit Try Statement 242
PART 3 MANAGING CORPORATE DATA
CHAPTER 10 Using Modules and Procedures 249
Working with Standard Modules 251
Creating a Standard Module 251
Working with Public Variables 254
Creating Procedures 259
Writing Function Procedures 260
Function Syntax 260
Calling a Function Procedure 262
Using a Function to Perform a Calculation 262
Writing Sub Procedures 266
Sub Procedure Syntax 266
Calling a Sub Procedure 267
Using a Sub Procedure to Manage Input 268
One Step Further: Passing Arguments by Value and by Reference 273
Which to Use: ByVal or ByRef? 274
CHAPTER 11 Using Arrays and Collections to Manage Data 277
Working with Arrays of Variables 278
Creating an Array 279
Declaring a Fixed-Size Array 280
Working with Array Elements 281
Creating a Fixed-Size Array to Hold Temperatures 282
Creating a Dynamic Array 286
Preserving Array Contents by Using ReDim Preserve 289
Working with Object Collections 291
Referencing Objects in a Collection 292
Writing For Each...Next Loops 292
Experimenting with Objects in the Controls Collection 293
Using the Name Property in a For Each...Next Loop 296
Creating Your Own Collections 298
One Step Further: Visual Basic for Applications Collections 302
CHAPTER 12 Exploring Text Files and String Processing 307
Displaying Text Files by Using a Text Box Object 308
Opening a Text File for Input 309
The FileOpen Function 309
Creating a New Text File on Disk 315
Processing Text Strings with Program Code 319
Processing Strings by Using Methods and Keywords 319
Sorting Text 321
Working with ASCII Codes 322
Sorting Strings in a Text Box 323
Protecting Text with Encryption 329
One Step Further: Using the Xor Operator 333
Examining the Encryption Code 335
CHAPTER 13 Automating Microsoft Office Applications and Managing Processes 341
Programming Application Objects by Using Automation 342
Using Automation in Visual Basic 343
The Visual Studio Object Browser 344
Automating Excel from Visual Basic 348
One Step Further: Starting and Stopping Windows Applications by Using the Process Component 356
CHAPTER 14 Deploying Visual Basic .NET Applications 361
Planning a Deployment 362
Different Ways to Deploy an Application 364
Creating a Deployment Project 365
Customizing Your Deployment Options 375
Building a Deployment Project and Testing Setup 381
One Step Further: Examining Setup Files and Uninstalling 386
PART 4 ADVANCED USER INTERFACE DESIGN
CHAPTER 15 Managing Windows Forms 393
Adding New Forms to a Program 394
How Forms Are Used 395
Working with Multiple Forms 396
Positioning Forms on the Windows Desktop 403
Minimizing, Maximizing, and Restoring Windows 408
Adding Controls to a Form at Runtime 409
Organizing Controls on a Form 412
One Step Further: Specifying the Startup Object 415
CHAPTER 16 Adding Graphics and Animation Effects 421
Adding Artwork by Using the System.Drawing Namespace 422
Using a Form’s Coordinate System 423
The System.Drawing.Graphics Class 424
Using the Form’s Paint Event 425
Adding Animation to Your Programs 427
Moving Objects on the Form 428
The Location Property 429
Le informazioni nella sezione "Su questo libro" possono far riferimento a edizioni diverse di questo titolo.
EUR 3,55 per la spedizione in U.S.A.
Destinazione, tempi e costiDa: KuleliBooks, Phoenix, AZ, U.S.A.
paperback. Condizione: Good. The book may have minor cosmetic wear (i.e. creased spine/cover, scratches, curled corners, folded pages, minor sunburn, minor water damage, minor bent). The book may have some highlights/notes/underlined pages - Accessories such as CD, codes, toys, may not be included - Safe and Secure Mailer - No Hassle Return. Codice articolo 521PY6003LIA
Quantità: 1 disponibili
Da: Wonder Book, Frederick, MD, U.S.A.
Condizione: Very Good. Very Good condition. With CD! A copy that may have a few cosmetic defects. May also contain a few markings such as an owner's name, short gifter's inscription or light stamp. Codice articolo E04B-02704
Quantità: 1 disponibili
Da: Wonder Book, Frederick, MD, U.S.A.
Condizione: As New. Like New condition. With CD! A near perfect copy that may have very minor cosmetic defects. Codice articolo B16A-03261
Quantità: 1 disponibili
Da: ThriftBooks-Atlanta, AUSTELL, GA, U.S.A.
Paperback. Condizione: Good. No Jacket. Pages can have notes/highlighting. Spine may show signs of wear. ~ ThriftBooks: Read More, Spend Less 2.9. Codice articolo G0735619050I3N00
Quantità: 1 disponibili
Da: Half Price Books Inc., Dallas, TX, U.S.A.
paperback. Condizione: Very Good. Connecting readers with great books since 1972! Used books may not include companion materials, and may have some shelf wear or limited writing. We ship orders daily and Customer Service is our top priority! Codice articolo S_417202297
Quantità: 1 disponibili
Da: Better World Books, Mishawaka, IN, U.S.A.
Condizione: Good. Pap/Cdr. Used book that is in clean, average condition without any missing pages. Codice articolo GRP63099582
Quantità: 1 disponibili
Da: Better World Books, Mishawaka, IN, U.S.A.
Condizione: Very Good. Pap/Cdr. Used book that is in excellent condition. May show signs of wear or have minor defects. Codice articolo 8661631-6
Quantità: 1 disponibili
Da: HPB-Ruby, Dallas, TX, U.S.A.
paperback. Condizione: Very Good. Connecting readers with great books since 1972! Used books may not include companion materials, and may have some shelf wear or limited writing. We ship orders daily and Customer Service is our top priority! Codice articolo S_412093070
Quantità: 1 disponibili
Da: HPB-Emerald, Dallas, TX, U.S.A.
paperback. Condizione: Very Good. Connecting readers with great books since 1972! Used books may not include companion materials, and may have some shelf wear or limited writing. We ship orders daily and Customer Service is our top priority! Codice articolo S_413968224
Quantità: 1 disponibili
Da: WorldofBooks, Goring-By-Sea, WS, Regno Unito
Paperback. Condizione: Very Good. The book has been read, but is in excellent condition. Pages are intact and not marred by notes or highlighting. The spine remains undamaged. Codice articolo GOR001308976
Quantità: 2 disponibili