Programming Visual Basic 2008

Free Download

Authors:

ISBN: 0596518439, 978-0-596-51843-1

Size: 9 MB (9891772 bytes)

Pages: 782/782

File format:

Language:

Publishing Year:

Category:

Tim Patrick0596518439, 978-0-596-51843-1

Ever since Visual Basic was merged into .NET, it’s become the core language for creating business applications with Windows. The latest version, VB 2008, is even more useful – and provides even more incentive for migrating from VB 6. All it lacks is a good book on how to harness its power. Programming Visual Basic 2008 fills the void. Written in a lively and engaging style by a developer who’s grown up with Visual Basic, including both VB 6 and VB .NET, this hands-on guide addresses the core topics of the new VB, from basic to complex, with plenty of code examples.

Table of contents :
Programming Visual Basic 2008……Page 1
Table of Contents……Page 9
Who Is Reading This Book?……Page 17
What’s in This Book?……Page 18
Conventions Used in This Book……Page 19
How to Contact Us……Page 20
Acknowledgments……Page 21
Before .NET……Page 23
Back to Introducing .NET……Page 24
The .NET Object……Page 25
Objects and Data……Page 26
Objects and Interfaces……Page 27
Objects and Instances……Page 28
The Common Language Runtime……Page 29
The Common Language Specification……Page 30
The Common Type System……Page 31
.NET Class Libraries……Page 32
Metadata and Attributes……Page 35
Versioning……Page 37
From Source Code to EXE……Page 38
What About Visual Studio and Visual Basic?……Page 39
Visual Studio 2008……Page 40
Summary……Page 44
Project……Page 45
The History of the Visual Basic Revolution……Page 52
The Basics of Logic and Data……Page 54
Data Types and Variables……Page 57
Literals……Page 58
Variables……Page 59
Data Types……Page 61
Advanced Declaration……Page 63
Local Declaration and Fields……Page 65
Comments……Page 66
Option Statements……Page 67
Basic Operators……Page 69
Using Functions and Subroutines……Page 71
Conditions……Page 72
If Statements……Page 73
Select Case Statements……Page 74
IIf and If Functions……Page 75
For…Next Loops……Page 76
Do…Loop Loops……Page 77
Exit Statements……Page 78
Creating Your Own Procedures……Page 79
Subroutines……Page 80
Functions……Page 81
Properties……Page 82
The GoTo Statement……Page 83
The Return Statement……Page 85
Events and Event Handlers……Page 86
Namespaces……Page 88
Referencing Namespaces……Page 89
The My Namespace……Page 91
Project……Page 92
Introducing the Project……Page 97
Library Item Features……Page 98
Administrative Features……Page 99
The Application As a Whole……Page 100
Data and Information……Page 101
Usability……Page 102
Commonality……Page 103
The Life of a Project……Page 105
Documentation……Page 106
Design and Planning……Page 107
Project Approval……Page 108
Changes to the Project……Page 109
Acceptance Criteria Testing……Page 110
Ongoing Support……Page 111
Project……Page 112
Deliverables and Acceptance Criteria……Page 113
Library Item Features……Page 114
Administrative Features……Page 115
Project Estimate and Timetable……Page 116
Relational Databases……Page 117
SQL Server 2005……Page 120
DDL Statements……Page 122
DML Statements……Page 125
Beyond Basic SQL……Page 128
Using Databases in Visual Basic……Page 129
Documenting the Database……Page 130
Project……Page 131
Security-related tables……Page 132
Support code tables……Page 134
Library items……Page 135
Patron-related tables……Page 138
Bar code-related tables……Page 140
Other miscellaneous tables……Page 142
Creating the Database……Page 144
What Is an Assembly?……Page 148
What’s Inside an Assembly?……Page 150
Assemblies and Applications……Page 153
The My Namespace and Assemblies……Page 154
Directives and Assemblies……Page 156
Summary……Page 158
Project……Page 159
Adding Controls……Page 160
Adding the Code to the Form……Page 164
Setting the Version Number……Page 168
Adding the Main Form……Page 170
Save Your Work……Page 172
The Nature of Computer Data……Page 173
Data in .NET……Page 175
Decimal Data Types……Page 176
Boolean Data Type……Page 178
Value Types and Reference Types……Page 179
Visual Basic Data Types……Page 180
Literals……Page 181
Constants……Page 182
Enumerations……Page 183
Variables……Page 184
Variable and Constant Naming Conventions……Page 187
Local Type Inference……Page 188
Operators……Page 189
Arrays……Page 194
Array Boundaries……Page 196
Nullable Types……Page 197
Conversion Functions……Page 198
Date-Related Functions……Page 199
String Functions……Page 201
Summary……Page 203
Project……Page 204
Inside a Windows Application……Page 209
Everything Is a Window……Page 210
Messages and the Message Pump……Page 211
Window Procedures……Page 212
Designing Windows Forms Applications……Page 213
Working with Forms……Page 217
Adding Controls……Page 220
Events and Delegates……Page 228
Making Forms Useful……Page 232
Project……Page 234
Configuring the Splash Screen……Page 235
Configuring the Main Form……Page 237
Making the Program Single-Instance……Page 240
Object-Oriented Programming Concepts……Page 241
Abstraction……Page 242
Inheritance……Page 244
Polymorphism……Page 245
OOP in Visual Basic and .NET……Page 246
Class Members……Page 247
Shared Class Members……Page 250
Overloaded Members and Optional Arguments……Page 251
Inheritance……Page 252
Creating Instances of Classes……Page 254
Constructors and Destructors……Page 256
Interfaces……Page 259
Modules and Structures……Page 260
Partial Methods……Page 261
The MsgBox Method……Page 263
Using DoEvents……Page 264
ParamArray Arguments……Page 265
Supporting List and Combo Boxes……Page 266
Editing Code Tables……Page 269
The Generic Detail Form……Page 270
The Generic Summary Form……Page 272
Lambda Expressions……Page 275
Implying Lambdas……Page 277
Expression Trees……Page 278
Complex Lambdas……Page 279
Variable Lifting……Page 280
Object Initializers……Page 281
The Nature of Errors in Visual Basic……Page 282
Unstructured Error Handling……Page 285
Structured Error Handling……Page 287
The Catch Clause……Page 288
Unhandled Errors……Page 289
Generating Errors……Page 291
Mixing Error-Handling Methods……Page 292
The System.Exception Class……Page 293
The Err Object……Page 294
Summary……Page 295
General Error Handler……Page 296
Unhandled Error Capture……Page 298
ADO.NET……Page 299
What Is ADO.NET?……Page 300
Providers……Page 301
Data Sets……Page 303
Data Sets Versus No Data Sets……Page 304
Creating a Data Source……Page 306
Using a Data Source……Page 308
Data Binding……Page 310
Building the Connection String……Page 311
Using SQL Statements……Page 312
Modifying Data……Page 313
Database Transactions……Page 314
ADO.NET Entity Framework……Page 315
Project……Page 316
Reference the Data Namespaces……Page 317
Connecting to the Database……Page 318
Interacting with the Database……Page 320
Processing Data Values……Page 321
System-Level Configuration……Page 322
Security……Page 325
Cryptography and Encryption……Page 326
Data Stability……Page 327
Encryption in .NET……Page 328
Symmetric Cryptography……Page 329
Asymmetric Cryptography……Page 331
Hashing……Page 332
User Authentication and My.User……Page 333
Project……Page 334
Authentication Support……Page 335
Encrypting Passwords……Page 337
Undoing Some Previous Changes……Page 340
Managing Security Groups……Page 341
Managing Users……Page 347
Per-User Experience……Page 348
What Is Operator Overloading?……Page 352
What Can You Overload?……Page 354
Mathematical Operators……Page 355
Comparison Operators……Page 356
Bitwise and Logical Operators……Page 357
The CType Operator……Page 358
Other Operator Overloading Issues……Page 360
Declaration Requirements……Page 361
Extension Methods……Page 362
Overloading a Conversion……Page 364
Global Support Features……Page 365
Extending a Framework-Supplied Class……Page 366
Record Editors and Supporting Forms……Page 367
Search-limiting forms……Page 368
More named item support forms……Page 369
Inherited code editors……Page 372
Connecting the Editors to the Main Form……Page 381
Setting the Default Location……Page 382
What Is XML?……Page 383
The XML Rule……Page 386
Some Basic XML……Page 387
Some Basic—and Meaningful—XML……Page 388
What About the Human-Readable Part?……Page 389
XML Schemas……Page 390
XML Namespaces……Page 392
Using XML in .NET: The Old Way……Page 393
The Basic XML Classes, Basically……Page 394
Schema Verification……Page 396
Using XML in .NET: The New Way……Page 397
Embedded XML Expressions……Page 398
XML Axis Properties……Page 399
Summary……Page 400
Project……Page 401
Report Configuration File……Page 403
Create Report Entry Class……Page 404
Design the Report Form……Page 405
Populate Reports from Configuration File……Page 407
Running the Reports……Page 411
Connecting the Select Report Form……Page 413
A Short History of Settings……Page 414
Settings in Visual Basic 2008……Page 416
Adding Settings to a Project……Page 417
My.Settings……Page 420
Summary……Page 422
Update Technical Documentation……Page 423
User settings……Page 424
Add the Settings……Page 425
Caching and Using Settings……Page 426
Adding Configuration Forms……Page 428
Connecting to the Configured Database……Page 435
Files and Directories……Page 438
Traditional Visual Basic File Management……Page 439
Stream Features……Page 440
Using a Stream……Page 441
Beyond Stream Bytes……Page 442
Reading a File Via a Stream……Page 444
My Namespace Versus Visual Basic Commands……Page 446
Reading and Writing Files Through My……Page 448
Summary……Page 449
Configuring Log Output……Page 450
Other Log Output Options……Page 452
Obtaining a Bar Code Font……Page 453
What Are Generics?……Page 455
Data Type and Interface Constraints……Page 458
Simultaneous Constraints……Page 460
Non-Generic Types with Generic Members……Page 461
Generics and Collections……Page 462
Generic Nullable Types……Page 463
Managing Holidays……Page 464
What Is LINQ?……Page 470
The Bad……Page 471
Anonymous Types……Page 472
LINQ to Objects……Page 473
The From Clause……Page 475
The Select Clause……Page 476
The Where Clause……Page 477
Joining Sources……Page 478
Skip and Take……Page 480
Aggregate Queries……Page 481
Advanced Query Expressions……Page 482
LINQ to XML……Page 483
LINQ to DataSet……Page 485
LINQ to SQL……Page 486
Deferred Execution……Page 490
Summary……Page 491
Looking Up Library Items……Page 492
Maintaining Search History……Page 499
Showing Item Detail……Page 501
Enabling the Search Features……Page 505
User Interface……Page 508
Overview of GDI+……Page 509
Selecting a Canvas……Page 510
Disposing of Graphics Objects Properly……Page 511
Pens……Page 512
Brushes……Page 513
Flowing Text from the Font……Page 515
Imagining Images……Page 519
Exposing Your True Artist……Page 521
Paths: Drawings on Macro-Vision……Page 523
Keeping It Regional……Page 524
Twisting and Turning with Transformations……Page 525
Enhancing Controls Through Owner Draw……Page 527
Windows Presentation Foundation……Page 529
WPF and XAML……Page 530
Enhancing Classes with Attributes……Page 532
Project……Page 533
Using Owner Draw……Page 534
Bar Code Design……Page 538
Fun with Graphics……Page 546
Defining Globalization and Localization……Page 548
Resource Files……Page 549
The My.Resources Object……Page 551
Localizing Forms Within Visual Studio……Page 553
Adding Resources Outside Visual Studio……Page 556
Manually Compiling Resources……Page 557
Compiling Satellite Assemblies……Page 558
Other Localization Features……Page 559
Summary……Page 560
Tracking Patron Payments……Page 561
Patron Record Access……Page 562
Patron Password Modification……Page 563
Collecting Patron Payments……Page 564
Managing All Fines and Payments……Page 568
Connecting Patron Features to the Main Form……Page 571
Dueling Patron Management Forms……Page 572
Printing……Page 574
Printing in Windows……Page 575
Printing in .NET……Page 576
Printing a Document……Page 579
Print Preview……Page 581
Counting and Numbering Pages……Page 583
Printing in “Raw” Mode……Page 585
Supporting Raw Printing……Page 586
Printing Tickets……Page 590
Printing Bar Codes……Page 592
Support for Check-In and Checkout……Page 594
Checking Out Items……Page 597
Checking In Items……Page 600
Report Options in .NET……Page 603
XPS Documents……Page 604
Integration with Microsoft Office……Page 605
Using Reporting Controls in .NET……Page 606
Adding the Data Source……Page 607
Adding a Report Design Surface……Page 608
Designing the Report Surface……Page 609
Using a Report Control……Page 610
Running the Report……Page 611
Adding a Page Header and Footer……Page 612
Support for Grouping and Sorting……Page 613
Enhanced Style Formatting……Page 614
Using Custom Data……Page 615
Supplying Custom Data Sources……Page 617
Project……Page 619
Crafting the SQL Statements……Page 620
Adding Report Schemas……Page 622
Adding Reports……Page 623
Adding a Report Viewer……Page 624
Adding Built-in Reports……Page 627
Software Licensing Options……Page 633
License Agreement Only……Page 634
Generated Custom License Key……Page 635
Controlled Access……Page 636
License Agreements……Page 637
Obfuscation……Page 638
The Library Licensing System……Page 640
Generating the License File……Page 642
Summary……Page 643
License File……Page 644
Library License Helper Application……Page 645
Adding the License to the Library Program……Page 649
Enforcing the License……Page 654
Daily Item Processing……Page 657
How the Internet Works……Page 664
Programming the Internet……Page 666
ASP.NET Features……Page 667
Trying Out ASP.NET……Page 668
More About Events……Page 675
State and View State……Page 676
Data Validation……Page 677
Database Integration……Page 679
Windows Communication Foundation……Page 680
Project……Page 685
Configuring the Database……Page 686
The Default Page……Page 687
Search Results……Page 688
Search Detail……Page 691
Statistics Report……Page 692
Windows Online Help Options……Page 694
Microsoft Help 2……Page 695
Designing HTML Help……Page 696
Help Project File……Page 698
Help Contents File……Page 699
Help Keywords (Index) File……Page 701
HelpProvider Control……Page 702
Showing pop-up help……Page 703
ShowHelp Method……Page 704
Building the Help Files……Page 705
Adding Help Support to the Application……Page 706
What’s Involved in Deployment?……Page 711
Direct ASP.NET Deployment……Page 712
XCopy Deployment……Page 713
Windows Installer Deployment……Page 714
Step 3……Page 716
Step 5……Page 717
After the wizard……Page 718
ClickOnce Deployment……Page 720
Planning the Deployment……Page 722
Building the Setup Project……Page 723
The Distribution Media……Page 730
The Library Project……Page 733
Visual Basic Flexibility……Page 736
The Programming Mindset……Page 738
Summary……Page 739
Download the Software……Page 741
Install Project Templates……Page 742
Bar Code Support……Page 743
Terms of Use……Page 744
Index……Page 747

Reviews

There are no reviews yet.

Be the first to review “Programming Visual Basic 2008”
Shopping Cart
Scroll to Top