BUY THIS BOOK
Add to Cart

Print Book $49.99


Add to Cart

PDF $34.99

Safari Books Online

What is this?

Add to UK Cart

Print Book £30.99

What is this?

Looking to Reprint or License this content?

Programming Visual Basic 2008
Programming Visual Basic 2008 Build .NET 3.5 Applications with Microsoft's RAD Tool for Business

By Tim Patrick
Book Price: $49.99 USD
£30.99 GBP
PDF Price: $34.99

Cover | Table of Contents | Colophon


Index


[ Symbols ], 
[ Numbers ], 
[ A ], 
[ B ], 
[ C ], 
[ D ], 
[ E ], 
[ F ], 
[ G ], 
[ H ], 
[ I ], 
[ J ], 
[ K ], 
[ L ], 
[ M ], 
[ N ], 
[ O ], 
[ P ], 
[ Q ], 
[ R ], 
[ S ], 
[ T ], 
[ U ], 
[ V ], 
[ W ], 
[ X ], 


Symbols[ Top ]
& (ampersand)
      &= (concatenation and assignment) operator, 34, 172
      button shortcuts, 148
      string concatenation operator, 36, 48, 169
            overloading, 334
< and > (angle brackets)
      < (less than) operator, 170
            overloading, 334
      < > (not equal to) operator, 48, 170
            overloading, 334
      << (shift left) operator, 48, 170
            overloading, 335
      <<= (shift left and assignment) operator, 172
      <= (less than or equal to) operator, 48, 170
            overloading, 334
      > (greater than) operator, 48, 170
      >= (greater than or equal to) operator, 48, 170
            overloading, 334
      >> (shift right) operator, 48, 170
            overloading, 335
      >>= (shift right and assignment) operator, 172
<%@, ASP.NET page directives, 648
<% . . . %> bracket pair for ASP.NET-specific commands and code, 648
<%= and %> symbols
      bracketing LINQ-specific code, 462
      embedded XML expressions, 376
<?xml . . . ?>, XML document declaration, 372
* (asterisk)
      *= (multiplication and assignment) operator, 171
      multiplication operator, 48, 168
            overloading, 332, 333
\ (backslash)
      \= (integer division and assignment) operator, 171
      integer division operator, 48, 168
            overloading, 333
^ (caret)
      ^= (exponentiation and assignment) operator, 171
      exponentiation operator, 48, 168
            overloading, 334
{ } (curly braces)
      enclosing array elements, 175
      enclosing multiple generic constraints, 438
. (dot)
      descendant-member XML axis, 377
      instance member access, 233
      separating nodes in type hierarchy, 11
      SQL syntax, 101
= (equals sign)
      assignment operator, 47, 171
      equal to operator, 48, 170
            overloading, 334
- (minus sign)
      -= (subtraction and assignment) operator, 171
      subtraction operator, 47, 168
            overloading, 333
      unary negation operator, 47, 168
            overloading, 333
# (number sign)
      in date and time literals, 37
      in directives, 135
( ) (parentheses)
      grouping clauses in operands, 49
      grouping in SQL statements, 104
      subroutine calls, 50
% (percent sign), wildcard character in SQL Server, 351
+ (plus sign)
      += addition and assignment operator, 171
      addition operator, 47, 168
            overloading, 333
      unary plus operator, 168
            overloading, 333
? (question mark), suffix for nullable instances, 441
" " (quotation marks, double)
      surrounding string literals, 36
      surrounding XML attributes, 366
' ' (quotation marks, single)
      date and time literals in SQL statements, 103
      enclosing comments, 45
      string literals in SQL statements, 103, 300
; (semicolon), ending SQL statements, 100
/ (slash)
      /= (division and assignment) operator, 171
      division operator, 48, 168
            overloading, 333

Numbers[ Top ]
3D graphics, 507

A[ Top ]
abbreviations, namespace, 68
absolute positioning, 648
abstract classes, 237
abstraction, 220
acceptance criteria testing, 88
acceptance document for a project, 89
Access database, 99
access levels, 10, 161
access modifier keywords, 44
      class members, 225
      constants, 161
      variables, 164
accessors, 60
accounting calculations, 179
Active Server Pages (ASP), 644
      (see also ASP.NET)
ActiveX controls, 692
ActiveX Data Objects (ADO), 277
Activity entry, Data Sources panel, 286
ActivityBindingSource control, 288
Add button (NamedItem form), 357
Add Service Reference form, 661
AddHandler statements, 209
Add-ins (Office), 584
addition operator (see + [plus sign], under Symbols)
AddressOf operator, 171
ADO (ActiveX Data Objects), 277
ADO.NET, 277-302
      connecting to SQL Server, using Visual Studio, 284-289
      data sets, 281
            pros and cons of using, 282
      database access tools, 294-302
      database transactions, 292
      definition of, 278
      Entity Framework, 293
      interacting with SQL Server, in code, 289-292
      LINQ providers, 463-468
      MARS support, 284
      providers, 279-281
Advanced Encryption Standard (AES), 307
aggregate expressions in non-aggregate queries, 460
aggregate functions, 105, 459
      listed, 459
Aggregate keyword, 459
aggregate queries (LINQ), 459, 475
Ajax, 32
Ajax Extensions controls, 650
al.exe (Assembly Linker) program, 536
aliases in LINQ queries, 460
All function, 459
AllowCurrentPage control, 561
AllowSelection control, 561
AllowSomePages control, 561
alpha blend, 491
ALTER TABLE statements, 101
Alt-F4 key, exiting an application, 217
ancestor-descendant relationships, 230
AND and OR keywords, 104
And operator, 48, 169
      overloading, 335
AndAlso operator, 48, 169
animation, user interfaces, 507
anonymous types, 450
      use in LINQ queries, 454
Any function, 459
AP (Assistance Platform), 674
app.config file, 393, 395
      changing log output location, 428, 429, 430
Apple Macintosh, 1
Application class, Run method, 191
Application Framework system, 212
      Startup event for applications, 213
application programming interface (API), 392
application settings, 392-415
      bound, 400
      My.Settings, 398-400
      in Visual Basic 2008, 394-400
            adding settings to a project, 395-398
applications
      EXE files, assemblies and, 131
      versioning, 15
architects, 86
arguments, 34, 58
      events, 143
      optional
            for overloaded class members, 230
            unlimited number for a method, 243
      subroutine, 50, 226
arrays, 172-175
      boundaries, 174
      converting LINQ query results to, 459
      initializing, 175
      multidimensional, 174
      ParamArray arguments, 243
As clauses, in generic placeholders, 437
AS clauses, SELECT statement, 105
As keyword, 43, 161, 453
AS keyword (SQL), 453
As New clause, 438
ASCII, 153
ASP (Active Server Pages), 644
ASP.NET, 644
      advances in web development technology, 645
      connecting web pages to a database, 657
      creating an application, 646-653
      data validation, 655-656
      direct deployment, 690
      events and web applications, 653
      state and View State, 654
<asp:xxx> tag, 651
assemblies, 13, 126-150
      applications and, 131
      compiled resource files as satellite assemblies, 528
      contents of, 128-130
      creation and deployment, 17
      directives and, 134-136
      examining contents using reflection, 131
      manually compiling satellite assemblies from .resx files, 535-537
      metadata, 13
      moving a .resx file into a satellite assembly, 535
      multiple, foreign-language, generating resources files for, 536
      My namespace and, 132-134
      .NET PE file contents, 128
      obfuscating, 617
      overview of, 126-128
      setting version number, 146
      versioning of shared components, 16
Assembly Linker program (al.exe), 536
AssemblyInfo.vb file, 147
AssemblyVersion attribute, 147
assignment, 34
      default assignment by Visual Basic, 45
      properties, 60
      values to variables, 38
assignment operator (see = [equals sign], under Symbols)
assignment operators, 171
Assistance Platform (AP), 674
asymmetric cryptography, 305, 309
attribute axis XML property, 377
attributes, 14
      class, 510
      WCF Services, 660
      XML, 366
      XmlAttribute class, 372
audio (in resource files), 529
authentication, 311
AutoCompletion (Visual Studio), 18
automatic updates, ClickOnce-deployed applications, 698
autorun.inf file, 710
Average function, 460
axis properties (XML), 377

B[ Top ]
banded reports, 587
bar codes
      fonts, 431, 721
      support for reading, 349
Base Class Library (see BCL)
base classes, 27, 222
      implementation of specific members, forced in derived classes, 237
      inheritance of members by derived classes, 230
      passing instance variables between derived classes and, 233
      shadowing members in derived class, 232
baselines of text blocks, 495
BASIC language, 31, 49
      defining an object containing an entire function, 253
BCL (Base Class Library), 11
      namespace hierarchy and, 13
      obsolete features, 14
BeginPrint event handler, 559
      changing to correct starting page number, 563
Berners-Lee, Tim, 642
beta versions, 87
bidirectional encryption, 306
bigint and smallint data types, 101
binary comparisons, 46
binary files, 361
binary operators, 47, 167, 331
binary values, 151
      for characters, 153
BinaryReader class, 421
BinaryWriter class, 421
binding (see data binding)
bitmaps
      associating Graphics object to, 489
      Bitmap object, 489, 497
      BMP files, 497
      creating in a variety of formats, 498
      drawing on a graphics surface, 498
      drawing with GDI+, 487
      image as drawn on a grid of bits, 498
      loading and saving, 498
      native BMP file format in Windows, 497
      stretching, cropping, and generating thumbnail while drawing, 499
      text based on, 496
      texture brushes, 491
bitwise conjunction operator (see And operator)
bitwise disjunction operator (see Or operator)
bitwise exclusion operator (see Xor operator)
bitwise negation operator (see Not operator)
bitwise operators
      overloading, 335
      (see also individual operators, under Symbols)
black boxes, 222
block statements, 165
block-level scope, 165
body of a procedure, 59
Boolean algebra, 37
Boolean data type, 39, 156
      conversions between integer values and, 156
      .NET, 153
Boolean values
      compiler constant, 135
      conditional statements resulting in, 51
      representing in binary form, 153
bound settings, 400
      main form position setting, 404
      (see also data binding)
boundaries, array, 174
BoundField column, GridView control, 667
BoundSchemaSearchResults class, 667
boxing and unboxing, 158
branches in code, 51
      If statements, 51
BrowsableAttribute attribute, 511
browser-based WPF programs, 507
brushes, 488, 491
      Brush object, 490
      drawing simple rectangles (example), 492
      using in text output, 496
buffer overrun issues, 3
BufferedStream object, 419
business-level software, xvi
Button class, 15
Button control, 141
      Click event handler, 208
      Click event in Visual Basic, 207
      monitoring event notifications, 208
      source code (example), 208
      typical event handler, 206
ByRef keyword, 58
Byte data type, 39, 154
      conversions, 337
ByVal keyword, 58
      parameters of partial methods, 240

C[ Top ]
c (denoting character literals), 36
C language, 49
C#, 31
      Boolean values, 41
            conversion to integers, 157
      conversions of Visual Basic code, MsgBox and, 715
Camel Casing, 166
CancelButton property, 141
canvas
      generalization by GDI+, 488
      Graphics objects, 488
      in-memory printer canvas, 553
CAPI (Cryptography API), 311
Cartesian join, 106
CAS (Code Access Security), 304
Cascading Style Sheets (see CSS)
Case clauses, Select Case statement, 52
Case Else condition, 53
casing methods, String class, 341
casing rules for variables, 166
Catch clause, Try . . . Catch . . . Finally statement, 266
CD distributions, 708
      installation keys, 613
CDate operator, 537
Char data type, 40, 156
character literals, 36
characters
      conversion to binary values, 153
      data types in .NET, 153
CheckBox controls
      Checkboxes dialog, 705
      CheckedChanged event firing as non-postback, 654
      installation process checkbox, 705-707
checksums, 306
child-member XML axis property, 377
Church, Alonzo, 253
CInt operator, 339, 342
Class and End Class keywords, 214
Class keyword, 225
Class Library projects, 23
classes, 6, 9, 225
      abstract classes defined by interfaces, 237
      anonymous types, 451
      attributes, 14, 510
      class libraries, .NET, 10-13
      constraining generic types, 437, 438
      constructors, 28, 163
      containing fields, local variables, and constants, 164
      creating instances of, 28, 232
      data type, 153
      derivation from System.Object, 157
      dividing single class among multiple source code files, 27
      extension methods, 340
      firing an event (example), 65
      forms, 142
      inheritance, 230-232, 244
      killing instances, 235
      members, 225-228
            overloaded, and optional arguments, 229
            shared, 228
      namespaces, 66
      naming, 12
      Object as root, 39
      partial, 225
      properties, 60
      referencing a library of, 68
      support by reference types, 158
Click event, 144
      adding to a form, 198
      Button control
            adding SQL Server data source, 290
            handler definition, 208
      errors stemming from, 269
ClickOnce deployment, 698
client-side data validation, 656
client-side record sets, 282
client-side scripting, 644
clipping regions, 502
closure classes, 258
CLR (Common Language Runtime), 7, 35
      final just-in-time (JIT) compilation of MSIL assembly, 17
CLS (Common Language Specification), 8
Codd, Edgar, 95
Code Access Security (CAS), 304
code behind features of Web Forms, 646, 663
code examples from this book
      "Before" and "After" version, 70
      license agreement, 722
code snippets
      inserting, 71
      installing, 721
Code Snippets feature (Visual Studio), 70
collections, 440
      converting LINQ results to, 459
colors, 488
      Color property, TextBox controls, 593
      predefined pens, 490
      specifying for pens, 491
columns, 95
      editing Columns collection for ListView control, 357
      editing in GridView control, 667
COM-based components and applications, 564
ComboBox controls, 244
      enhancing through owner draw, 505
      filling lists, 247
      Items collection, 245
      tracking ID numbers in, 246, 342
command line
      cmd.exe, 535
      text-based applications, 23
Command object, 280
comma-separated values (CSV), 362
comments, 44
      XML, 366
            documentation generated from, 674
      XmlComment class, 372
Commit method, 293
Common Type System (see CTS)
commonality, 82
CompareValidator, 656
comparison operators, 48, 170
      overloading, 334
compilation configurations in projects, 707
compiled resource files, 528
compiler constants, 135
      data types, 136
      setting once for entire application, 136
compilers
      adding constructors, 29
      compiling Visual Basic source code, 17
      generation of IL, 8
      HTML Help, 675
      object-oriented language, 219
      version number of Visual Basic compiler, 136
compile-time errors, 260
compression/decompression of data, 419
Condition property, 706
conditions, 50-54
      If statement, 51-52
      IIf and If functions, 53
      including/excluding portions of source code, 135
      Select Case statement, 52, 53
.config files, 393
Configuration Manager in Visual Studio, 707
ConfigurationManager object, 665
Connection object, 280
connection strings, 289
      saving in web.config file, 658
console applications, 23
      Visual Basic source code, 8
#Const directive, 134
Const keyword, 43
      access modifier keyword preceding, 161
      defining constants, 160
constants, 43, 160
      constant fields as class members, 226
      declaration of, 43
      declared outside a procedure, 164
      naming conventions, 165
constraints, 101
      classes constraining generic types, 437
      interfaces constraining generic types, 437
constructors, 28, 42, 163, 234
      custom, creating, 235
content (data values), 36
content files (HTML Help), 674, 676
Continue statements, 57
contract between interfaces and implementing class or structure, 237
Control class, 191, 197
Control Panel, Regional and Language Options applet, 538
controls, 189, 191
      ASP.NET web page, retaining state, 655
      binding properties into settings system, 400
      code for design-time presentation, 318
      CreateGraphics method, 489
      data binding feature, 288
      data region, in RDLC reports, 587
      designing with WPF and XAML, 509
      enhancing through owner draw, 505
      events and delegates, 206-209
      HTML Help, 680
      properties common to forms and controls, 197
      PropertyGrid, 511
      reporting controls in .NET, 584-597
      Smart Tags, 200
      supplying drawing code to (owner draw), 488
      Web Forms, 649-651
            validators, 655
      Windows Forms
            adding, 15
            available in Visual Studio, 200-205
conversion functions, 176
conversions
      between bytes and characters, 420
      custom, with overloaded CType operator, 338
      LINQ query results, 459
      narrowing conversions, 337
      simple data conversions by Visual Basic, 45
      widening conversions, 337
costs, approval for a project, 87
Count function, 460
CREATE TABLE statements, 100, 103
CreateGraphics method, 489
CreateReader function, 298
cross joins, 106
cryptography, 304-311
      data encryption ensuring data integrity, 305
      encrypted installation key, 613
      encryption in .NET, 306-311
      encryption techniques, 305
      idenfity verification with digital signatures, 306
      public-private key encryption, 613
      public-private key pair, use in digital signing, 623
Cryptography API (CAPI), 311
CryptoStream class, 307-309, 419
Crystal Reports, 583
CSS (Cascading Style Sheets), 480
      adjusting web application layout, 653
      support in Visual Studio 2008, 20
CSV (comma-separated values), 362
CTS (Common Type System), 9, 34
CType operator, 336
      overloaded, 339
culture, 527
      embedding in assembly, 537
      format of dates, 551
      settings for, 129
      string manipulation for localized display, 537
currency format, localizing, 537, 544, 548
current settings, 399
Custom Actions Editor, 697
custom-generated license key, 613
CustomValidator, 656
cyclical approach to project management, 84

D[ Top ]
DAO (Data Access Objects), 277
data, 151
      defined, 79
      and information needs, 79
      interchange, enhancement through use of standards, 3
      nature of computer data, 151
data binding, 107, 288
      combining report components, 589
      controls' feature, 288
      search results to GridView control, 667
data context, 465
data controls, 650
data definition language (see DDL)
Data Encryption Standard (DES) algorithm, 306, 307
data management system (CLR), 7
data manipulation, 4
data manipulation language (see DML)
data mapping, 293
data region controls (RDLC reports), 587
data security, 304
data sets, 279, 281
      LINQ to DataSet, 463
      pros and cons of using, 282
      records tied to report data regions, 587
Data Source Configuration Wizard, 658
data sources
      adding to RDLC report, 585
      creating, 284-286
      custom data, using in RDLC report, 593
      linking to report region, 587
      supplying custom for RDLC report, 595-597
      using, 286
data structures (see structures)
data types, 39, 152
      anonymous, 450
      character, 156
      classes, treating instance as Object, 157
      constants, 160
      conversions, 45, 176
      CTS (Common Type System), 9
      decimal, 154
      delegate, 207
      enumerations, 161
      exported type information (assemblies), 129
      generic type parameters, 436
      generics as placeholders for, 433
      integer, in .NET, 154
      internal type information (assemblies), 129
      limiting a stack to a specific type, 441
      literals, 159
      naming conventions, 166
      nested, in classes, 228
      .NET, 153
      non-generic, with generic members, 439
      nullable types, 175
      passing by value or by reference, 58
      as resources, 529
      settings, 395
      SQL Server, 101
      strongly typed languages, 166
      value types and reference types, 39
      variables, 35, 162
      Visual Basic, 158
            .NET equivalents, 158
            interchangeable with .NET equivalents, 159
data validation, 655-656
data values (XML), 366
DataAdapter object, 280
database integration, ASP.NET pages, 657
database tables
      filling ComboBox lists, 247
      ID fields, generation of, 292
databases, 95-125
      ADO.NET Entity Framework, 463
      database interaction tools, 277
      database library for .NET (see ADO.NET)
      documenting, 108
      files stored in CSV format, 362
      LINQ support for, 449
      relational database systems, 95-97
      SQL (Structured Query Language), 100-107
      SQL Server 2005, xvii, 98
      SQL Server 2008, 20
      using in Visual Basic applications, xvi, 107
DataBind method, GridView control, 669
DataContext class, 468
DataNavigateUrlFields property, 667
DataNavigateUrlFormatString property, 668
DataReader object, 280
DataRelation objects, 281
DataSet objects, 281
      (see also data sets)
DataTable objects, 281, 463, 603
date and time literals, 37
date and time values, 153
      culturally-sensitive setting, 551
      data type in .NET, 153
      date-related functions, 177
      literal, in SQL statements, 103
      localization, 537
      System.DateTime data type, 156
Date class, 40, 178
DateTime class, 178
DayOfWeek enumeration, 162
dbml files, 465
      underlying designer file, 467
DDL (data definition language), 97
      statements, 100-103
DEBUG constant, 136
Debug object, 273
DebuggerNonUserCode attribite, 27
debugging
      enhanced support in Visual Studio 2008, 21
      support for JavaScript in Visual Studio 2008, 21
Decimal class, 40, 155
decimal numbers, 34, 152
      .NET data types, 154
declarations
      enumeration, 162
      New keyword, combining with member assignment, 259
      operator, 332
      operator overloads, 339
      property, 60
      Sub declaration statement, 58
      supplied by Visual Basic, 45
      variables, 38
      XML documents, 372
Declare statements, 228
default constructor, 42, 234
default instances of project forms, 149
default location, setting, 360
default settings, 399
Default.aspx file, 646
Default.aspx.vb file, 646
deferred execution, 468
DeflateStream object, 419
delegates, 9, 207
      class member, 227
      linking functions to variables, 254
      namespaces, 66
      support for LINQ, 450
DELETE statements, 97, 104
DeleteFile method, 134
deliverables, 85
      interim, identified by milestones, 86
deployment of applications, 3, 89, 689-710
      ASP.NET, 645
      assemblies and manifests, 13
      involved process, 689
      Library Project (example), 700-710
      methods within Visual Studio, 690-700
            ClickOnce, 698
            direct ASP.NET deployment, 690
            Windows Installer, 692-698
            XCopy deployment, 691
      side-by-side deployment, 16
Deployment property, 699
derived classes, 27, 222
      constructors, 235
      forced to implement specific base class members, 237
      inheritance of base class members, 231
      partial classes, 230
      passing instance variables between base class and, 233
      shadowing of base class members, 232
DES (Data Encryption Standard) algorithm, 306, 307
descendent-member XML axis property, 377
DESCryptoServiceProvider class, 306, 307-309
design and planning, 85
design document, 85
      approval by user and programmer, 86
designer file underlying dbml file, 467
DesignerGenerated attribute, 27
design-time presentation code, 318
desktop shortcuts, 703
destructors, 235
detail form, generic, 248-250
developer productivity, enhancement with .NET, 3
development phase of projects, 87
DialogResult property, 149, 211
Dictionary collection, 459
Digital Signature Algorithm (DSA), 309
digital signatures, 306, 614
      attached to assembly manifest, 13
      generating for Library license file, 623-626
      generation of, 625
      SignedXml class, 625
      unscrambling and comparing with rest of license, 627
      validating (example code), 631
Dim keyword, 38, 44, 162
Dim statements
      at beginning of procedures, 163
      within block statements, 165
dimensions (arrays), 174
directives
      ASP.NET page directives, 648, 660
      assemblies and, 134-136
discipline (programmers), 716
disconnected data experience (ADO.NET), 278
Dispose method, Graphics object, 489
Distinct clause, LINQ queries, 455
distributed transactions, 659
distribution of applications, 89
      Library Project (example), 708
division operator (see / [slash], under Symbols)
"DLL hell", 3
.dll files, 13
DLLs
      Class Library projects, 23
      identifying file containing a namespace's types, 67
      Library Project deployment, 702
      raw printer support in Windows, 564
      versioning, 127
DLR (Dynamic Language Runtime), 22
DML (data manipulation language), 97
      statements, 103-106
Do . . . Loop statements
      Do statements
            Continue Do statement, 57
            Exit Do statement, 56
      Do While . . . Loop block, 34
      Do . . . Loop loops, 55
Document Type Definition (DTD), 369
documentation
      documenting the database, 108
      generated from XML comments for class members, 674
      importance throughout entire project, 84
      project-specific needs of user, 83
documents (XML), 372-374
      creating with LINQ to XML, 461
      XDocument object, 376
DoEvents method, 242
      problems caused by overusing, 243
dongles, 614
Dotfuscator, 616
Double data type, 40, 155
drawing elements (GDI+), 488
Drawing namespace, 487
drawing system (see GDI+)
DROP TABLE statements, 101
DSA (Digital Signature Algorithm), 309
DSACryptoServiceProvider class, 309
DTD (Document Type Definition), 369
duplicates, eliminating from LINQ query results, 455
Dynamic Language Runtime (DLR), 22

E[ Top ]
editing components (Visual Studio Professional), 24
elements (XML)
      attributes, 366
      XElement class, 376
      XmlElement class, 372
Else keyword
      If statement, 51
ElseIf keyword, 51
      If statement, 52
Emacs, 18
email, sending as result of LinkClicked event, 145
embedded XML expressions, 376
empty strings (""), 34
encryption algorithms, 305
EncryptPassword routine (example), 316
End Class keyword, 214
End Enum line, 161
End If statements, 51, 52
End Namespace clause, 69
End statements, 52, 64
End Sub statement, 58, 59
EndPrint event, 559
entities, 293
      inheritance, 293
      LINQ to Entities, 463
Entity Framework, ADO.NET, 293, 463
      availability of, 294
entity sets, 293
Enum statement, 162
enumerations, 9, 161
      class member, defining, 226
      defined as member of a type, 162
      namespaces, 66
equal to operator (see = [equals sign], under Symbols)
Equals keyword, 457
Equals method, overriding in ListBox control lookups, 246
Err object, 264, 272
      GetException method, 270
      Raise method, 270
error handling, 260, 263
      catchall, trapping unmanaged exceptions, 268
      disabling, 265
      ingoring errors, 265
      mixing unstructured and structured, 270
      structured, 265-269
      unstructured, 263-265
error messages
      displayed by Web Forms validators, 656
      generating and logging, 428
errors, 260-263
      compile-time, 260
      database interaction routines, 298
      ErrorToString function, 273
      generating, 269
      generating and logging, 428
      ignoring, 265
      IsError function, 273
      logic, 262
      runtime, 261
      unhandled, 267
escape sequences, 553
ethics (programmer traits), 716
event handlers, 64-66, 206
      adding template for LinkClicked, 144
      arguments, 65
      attached to class instance, 65
      Button control Click event, 207
      defined, 64
      linking to an event, 144
      typical for Button control, 206
      WPF and XAML application, 510
      (see also events)
Event statements, 65, 207
      using delegates instead of full argument lists, 207
EventArgs class, 206, 207
events, 64-66, 143, 190
      adding Click event to a form, 198
      arguments, 143
      button click, processing between action and custom logic, 206
      connecting to local instance of PrintDocument, 554
      connecting to a subroutine with Handles, 74
      controls, 206
            Button control event handler, 206
      defining for classes, 227
      firing, 64
      importance in .NET application development, 209
      indirect calls to a procedure, 64
      Load event, 145
      monitoring by event handlers, 207-209
      using instead of partial methods, 241
      web application, 653
exceptions
      catching, 267
      Exception class, 271
      throwing, 270
      (see also error handling; errors)
Exchangeable Image File ("EXIF") files, 497
exclusive or (Xor) operator, 48, 169
      overloading, 335
EXE files, 13, 131
      versioning, 127
EXIF files, 497
Exit Function statements, 63
Exit statements, 56
Exit Sub statement, 715
Exit Try statement, 267
exponentiation operator (see ^ [caret], under Symbols)
Express Edition of Visual Studio 2008, 18
express version of an application, 134
expressions, 49, 167
      embedded XML expressions, 376
      Expression design products, 508
      Expression Editor, 591
      expression trees, 256
      Expressions namespace, 256
      LINQ query, basic, 453-458
      (see also lambda expressions)
eXtensible Application Markup Language (see XAML)
eXtensible Markup Language (see XML)
Extension attribute, 341, 345
extension methods, 341
      creating, 341
      IEnumerable interface, 461
      SqlDataReader class, 344, 473
      support for LINQ, 450
external security (.NET), 304

F[ Top ]
fading effect, 524
False value, 37
      conversion to integers, 156
FCLs (Framework Class Libraries), 11, 127
      classes and objects in, 225
      culture management features, 538
      error generation, 269
      namespace hierarchy and, 13
      obsolete features, 14
      version 3.5, 13
fields, 4, 43
      database columns, 95
      database, null values, 104
      naming conventions, 166
      properties and, 61
      scope of, 165
      variables and constants declared outside a procedure, 164
file handles, 417
File System Editor, 697, 702
      Fonts folder, 707
File Types Editor, 697
FileLogTraceListener class, 429
files and directories, 416-428
      assembly file listing, 129
      manipulating through streams, 418-424
      My namespace and Visual Basic file management, 424-426
      reading and writing through My, 426
      reading files via streams, 422
      resource files, 529
      traditional Visual Basic file management, 417
FileStream object, 418
FileSystem object
      file interaction features, 424-426
      OpenTextFieldParser method, 427
      OpenTextFileReader and OpenTextFileWriter methods, 426
      ReadAllText and ReadAllBytes methods, 426
      WriteAllText and WriteAllBytes methods, 427
filesystems, 416
FillColor property, 518
FillListWithRecords method, 252
Finalize method, 236
      suppressing, 237
Finally clause, Try . . . Catch . . . Finally statement, 267
financial and accounting calculations, 179
firing an event, 64
fixed-point decimal values, 153
flat file database tables, 96
floating-point values, 37, 153
flow control
      (see also conditional statements; loops)
flow control statements, 34, 61-64
      End and Stop statements, 64
      GoTo statement, 61
      Return statement, 63
flow layout mode, 648
fonts, 493-496
      bar code, 431, 512, 721
      choosing, 493
      complex manipulation with GDI+, 496
      families, 493
      Font class, 493
      Fonts folder, 707
      GDI+ drawing elements, 488
      installed, loading list of, 409
      lining up, 495
      mixing and matching on an output canvas, 494
For Each . . . Next loops, 55
For statements
      Continue For statement, 57
      Exit For statement, 56
For . . . Next loops, 54
      GoTo statements and, 62
foreign references, 101, 463
Form class, 142, 193, 195
      accessing, 68
      ShowDialog method, 210
form surface, 138
Format function, 548
forms, 189, 191
      adding code for events, 142-146
      adding controls, 138-142, 198-205
      Assembly Information form, 147
      binding properties into settings system, 400
      closing, 149
      CreateGraphics method, 489
      enhancing ComBox control through owner draw, 505
      events and delegates, 206-209
      generic type used with, 437
      interesting properties and their uses, 195-197
      localizing within Visual Studio, 531-534
      modifying properties through source code, 197
      PrintDocument control, 554
fractions, 152, 154
Framework Class Libraries (see FCLs)
Free Software Foundation, GNU General Public License, 612
FreeFile function, 417
Friend statement, 28
      friend access modifier, 223
Friend variables, 164
From clause, LINQ query expressions, 453
FrontPage Extensions, 691
full outer joins, 106
Func keyword, defining lambda expressions, 254
function calls, 34
Function keyword, beginning lambda expressions, 254
function methods, 227
functional programming, 253
      (see also lambda expressions)
functions, 49, 59
      built in, 176
      complex, breaking into basic functions, 257
      conversion functions, 176
      date-related, 177
      intrinsic, 35
      miscellaneous, 181
      modifying LINQ query results, 454
      numeric, 179
      operators as, 331
      return value, 50
      string manipulation, 179

G[ Top ]
GAC (Global Assembly Cache), 13, 127
garbage collection, 236
      reference types, 158
      SuppressFinalize method and, 237
GDI (Graphics Device Interface), 486
      (see also GDI+)
GDI+, 487-488, 511
      brushes, 491
      drawing text and graphics on printed pages, 582
      images, 497-499
      owner draw, 505
      pens and brushes, 490
      placing text on your graphics surface, 493-496
      using in Library Project, 511-525
      using to generate printed pages, 553, 563
generated custom license key, 613
generated general license key, 613
generators, public/private key pairs, 309
generic detail form, 248-250
generic summary form, 250-252
Generic.Dictionary collection, 459
Generic.List collection, 459
generics, 433-447
      anonymous types, 451
      constraint on type parameter, 437
      data type and interface constraints, 436-438
      general placeholder (T), 434
      multiple placeholders in a class, 436
      nesting, 439
      non-generic types with generic members, 439
      nullable types, 441
      overloading types and members, 440
geometric transformations, 503
Get accessor, 60
GetData method, IService interface, 660
GetException method, Err object, 270
GetLowerBound method, 174
GetPrivateProfileString API call, 423
GetType operator, 171
GetUpperBound method, 174
GetXmlNamespace function, 378
GIF files, 497
Global Assembly Cache (see GAC)
Global keyword, 27, 66
globalization
      changing Localizable property of a form, 532
      culture, user-interface and string manipulation, 537
      defined, 527
      Globalization namespace, culture management features, 538
GNU General Public License, 612
GO command, 100
goals, project, 85
GoTo statements, 61
      limiting use of, 62
gradient brushes, 491
graphical user interfaces, 507
      (see also user interface)
graphics
      in eary display systems, 486
      files added to HTML Help pages, 676
      GDI+, 487, 487-488
      .NET support for, 486
Graphics Device Interface (GDI), 486
      (see also GDI+), 486
Graphics Interchange Format ("GIF") files, 497
Graphics objects, 488-490
      canvas for output of GDI+ printer command, 554
      disposing of properly, 489
      DrawImage method, 498
            overloads, 499
      DrawString method, 493, 523
      methods, 499
      methods applying transformations, 504
      obtaining and creating, 489
      owner draw, 488
      passing drawing commands through geometric transformations, 503
      providing a canvas for drawing, 488
GraphicsPath class, 501
greater than operator (see < and > [angle brackets], under Symbols)
GridView controls
      binding search results to fields, 666-669
      editing columns, 667
      statistics report list bound to, 670
grouping
      adding to a report, 591
      in SQL statements, 105, 599
GZipStream object, 419

H[ Top ]
Handles keyword, 65, 74, 208
hardware identity with license key, 614
hash value, 306
hashing algorithms, 306, 310
      using for installation keys, 613
hashing functions, 305
hatch brushes, 491
Hawaii (upcoming release of Visual Basic), 22
header, PE files, 128
"Hello, World!" code example, 8, 70-74
Help Contents file (HTML Help), 674
Help Integration Kit, 674
Help Keywords file (HTML Help), 675
Help Project file, 675, 676
Help.ShowHelp method, 682
HelpProvider control, 680-682
      accessing HTML Help files, 681
      pop-up help on individual controls, 681
Hex function, 317
.hhc files, 674
.hhk files, 675
.hhp files, 675
hierarchical query results (LINQ), 457
hierarchy, .NET types, 11
high-level languages, 33
hit testing, 503
HMACSHA1 class, 311, 316
HTML, 582
      ASP.NET application source code, 648
      assigning content to Literal control, 669
      controls, 650
      Default.aspx file, 646
      generating from client- or server-side scipting, 644
      generating from XML data, 368
      generation by ASP.NET, 644
      improved editor, 20
      item detail custom content, WebBrowser control, 479-481
      links for WebBrowser control, 481-482
      (see also forms; web development)
HTML Help, 673
      accessing, 680-682
            HelpProvider control, 680-682
      designing, 674-680
            content files, 676
            formatting help windows, 680
            Help Contents file, 677
            Help Keywords file, 679
            Help Project file, 676
HTML Help Workshop, 675
Hungarian Notation, 165
HyperLinkField column, GridView control, 667

I[ Top ]
IBM PCs, 1
ICO files, 497
icons
      desktop, configuring in setup project, 704
      ICO files, 497
      in resource files, 529
IDENTITY keyword, 101
IDisposable interface, 236
IEnumerable interface, 55, 451
      data sources used with MicrosoftReportViewer control, 593
      DataTable objects and, 463
      extension methods, 461
IEnumerable(Of T) interface, 451, 459
If (ternary) operator, 51, 54
#If directive, 134
If statements, 51-52
      conditions, 51
      ElseIf clauses, 52
      statement keywords, 52
      variations for inline use, 53
IIf function, 53
IIS (Internet Information Server), 644
IL (Intermediate Language), 2, 8
      compilation and decompilation, 17
      MSIL code in .NET PE files, 128
      obfuscation in .NET, 617
IL Disassembler tool, 618
ildasm.exe tool, 17
Image class, 497
images, 497-499
      drawing on graphics surface, 499-501
      file formats, 497
      in resource files, 528
      static, video, and animated user interface images, 507
implementation, object, 6, 224
Implements keyword, attaching interfaces to a class, 238
imported namespaces, 295
Imports statement, 68
      defining XML namespace, 378
      My namespace and, 69
In keyword (LINQ), 453
index (Help Keywords) file, 679
Index Entry editor form, 680
Indexed Sequential Access Method (ISAM), 277
indexes (SQL Server), 101
IndexOf method, Items collection, 247
inferred types, with lambda expressions, 255
information, defined, 79
inheritance, 222
      classes implementing interfaces, 238
      entity, 293
      MustInherit keyword, 237
      support in Visual Basic, 230-232
Inherits keyword, 27, 230
INI files, 393
      extracting a value from, 422
      Help Project file, 675
InitializeComponent procedure, 28, 143, 193
      defining Button control instance, 208
initializers
      constants, 161
      object, 259
inner joins, 105
      LINQ query, 457
innovation versus commonality, 81
input and output devices, accessing stored data, 4
INSERT statements, 97, 103
      returning single field from a record created via, 292
installation directory, 126
installation keys, 613
InstalledFontCollection object, 409
InstalledPrinters string collection, 557
instance members, 229
instances, 6
      class, using shared members instead of, 229
      creating class instances, 232
instantiation, 41
Int16 data type, 154
Int32 data type, 154
Int64 data type, 154
integer division operators (see \ [backslash], under Symbols)
integers, 34, 37
      conversion of Boolean values to, 156
      Integer class, 40
      .NET data types, 153, 154
IntelliSense (Visual Studio), 18, 652
      support for JavaScript in Visual Studio 2008, 21
      transparent windows in Visual Studio 2008, 21
interaction with data, 4
interactive multimedia, 507
interface testing, 88
interfaces, 9, 222, 228
      advantages of using, 238
      constraining generic types, 437
      contract with implementing class or structure, 237
      multiple, constraining a generic type, 438
      namespaces, 66
      object, 5, 224
      (see also user interface)
Intermediate Language (see IL)
intermediate resource files, 528
internal members, 5
internal security (.NET), 304
Internet
      how it works, 642
      programming, 644
Internet Explorer
      viewing ASP.NET application source code, 655
      WebBrowser control in applications, 479
interop, 564
      Primary Interop Assemblies (PIA), 584
intrinsic functions, 35
Is operator, 48, 171
ISAM (Indexed Sequential Access Method), 277
IsError function, 273
IService interface, 660
IsFalse operator, 336
IsNot operator, 48, 171
IsNumeric function, 184, 262
IsTrue operator, 336
ItemData array, 244
ItemProperties control, 522
Items collection, 245
      IndexOf method, 247
iteration variables, 453
iterative approach to project management, 84

J[ Top ]
Japanese language, form localization, 533-534
JavaScript, 648
      Ajax, 650
      IntelliSense and debugging support, Visual Studio 2008, 21
joins, 105
      LINQ query sources, 456
Joint Photographic Experts Group (see JPEG files)
JPEG files, 497
      GDI+, 487

K[ Top ]
Kemeny, John, 31
key user, 75
keyboard events, 66, 189
KeyDown event handler, 217, 686
KeyPreview property, 217, 686
Keys enumeration, 217
keywords
      Help Keywords file, 675
      LINQ, 452
      statement, 52
Kill command, 134
Kurtz, Thomas, 31

L[ Top ]
Label control, 139
      simulating lines and rectangles, 140
labels, line, 61
lambda calculus, 253
lambda expressions, 253-259
      complex, 257
      defining a variable as a simple function, 254
      expression trees, 256
      with inferred types, 255
      support for LINQ, 450
      variable lifting and closure classes, 258
Language Integrated Query (see LINQ)
language-culture selections, 532
languages, 527
      Language property, 532
      language settings, 129
      translator converting a form to a specific language, 534
last in, first out (LIFO), 440
Launch Conditions Editor, 697
Left function, 183
left outer joins, 105
Len function, 183
Length property, Stream object, 418
less than operators (see < and > [angle brackets], under Symbols)
Let keyword (LINQ), 475
libraries
      browser-based WPF programs, 507
      (see also BCL; FCLs)
license agreements, 615
      software for this book, 722
license-checking code (example), 634
LicenseStatus enumeration (example), 628
licensing, 611-641
      controlled access, 614
      custom-generated license key, 613
      license key with hardware identity or lock, 614
      license-agreement-only method, 612
      software, options for, 611
lifetime of a variable, 165
Like operator, 48, 170
      overloading, 335
line continuation characters, LINQ to XML code, 461
line labels, 61
linear approach to project management, 84
lines and shapes, adding to a form, 140
lines, geometric transformations, 503
LinkClicked event, 325
LinkLabel controls, 141
      multiple web-style links, 145
links, 144
      HTML Help files, 675
LINQ (Language Integrated Query), 32, 448-485
      advantages of, 449
      aggregate queries, 459
      anonymous types, 450
      conversions of query results, 459
      deferred execution of queries, 468
      disadvantages of, 449
      LINQ for ADO.NET data, 463-468
            LINQ to DataSet, 463
            LINQ to Entities, 463
            LINQ to SQL, 464-468
      LINQ to Objects, 451
      LINQ to XML, 461
      query expressions, advanced, 460
      query expressions, basic, 453-458
            Distinct clause, 455
            From clause, 453
            joining sources, 456
            Order By clause, 456
            Select clause, 454
            Skip and Take clauses, 458
            Where clause, 455
      supporting technologies, 450
      updates of underlying data stores, 469
      Visual Studio 2008 features, 20
LISP language, 4, 331
List array, 244
List collection, 459
List controls
      with a field from the data set, 587
      grouping data in a report, 591
ListBox controls, 244
      DisplayMember property, 245
      enhancing through owner draw, 514-516
      example, 245
      generic summary form, 250
      ItemLookup form, 470
      Items collection, 245
      listing of installed font families, 493
      override of Equals method, 247
      providing custom drawing code for, 488
      storing objects as items, 382
      tracking ID numbers in, 342
      ValueMember property, 245
ListItemData objects, 476
      adding CType overload, 342
      example, 246
lists, value comparisons against, 52
ListView control, modifying Columns collection, 357
Literal control, 670
literals, 36, 159
      Boolean, 37
      character, 36
      date and time, 37
      not reusable, 37
      numeric, in SQL statements, 103
      string, 36
            single quotes within, 45
      XML (see XML Literals)
Load events, 145
      Web Forms applications, 654
local constants, 164
local type inference, 166
      support for LINQ, 450
      turning on and off, 167
local variables, 164
      declaration of, 43
Localizable property, 532
localization
      currency formatting, 544, 548
      dates in culture-neutral format, 551
      defined, 527
      displaying times, dates, and monetary values, 537
      features in .NET, 526
      language localization with resource files, 527-530
      localizing forms within Visual Studio, 531-534
Location property, 400
location, changing for logfile output, 429
locking of database records, 279
logic
      errors in, 262
      separation from presentation application design, 508
      translating for computers with programming languages, 33
logical and physical views of data, 463
logical line, 34
logical operators, 48, 104, 169
      overloading, 335
login controls, 650
Long data type, 40, 45
loops, 54-57
      Continue statements, 57
      Do . . . Loop, 55
      Exit statement, 56
      For Each . . . Next, 55
      For . . . Next, 54
      GoTo statements and, 62
lower bound of an array, 174

M[ Top ]
MAC (Message Authentication Code), 311
machine code, 2, 33
Macintosh, 1
Main method, 193
      custom, 194
managed code, 7
Management Studio Express, 123
manifests, 13, 129
many-to-many relationship, 106
Map.xml file, 618
Mapping namespace, 468
mapping of data, 293
MARS (Multiple Active Result Sets), 284
      including support in SQL Server connection string, 290
Math class, 179
mathematical operators, 47, 168
      overloading, 333
Max function, 460
MD5 hash algorithm, 311
Me keyword, 207
      references to instance members, 233
members of a class, 4, 10, 225-228
      naming conventions, 166
      object, 221
      overload members and optional arguments, 229
      shared, 228
memory leaks, 3
MemoryStream object, 419
Message Authentication Code (MAC), 311
message pump, 64, 189
      including in Sub Main procedure, 194
      in Visual Basic programs, 64
message queue, 64, 189, 659
MessageBox.Show method, 242
messages, 189
metadata, 13
      .NET PE file, 128
Metafile class, 497
metafiles, 497
methodology framework for projects, 83
methods, 50
      class member, subs and functions, 226
      error handling, 271
      extension methods, 341
      form, accessing in source code, 197
      generic, 439
      naming conventions, 166
      parameter array arguments, 243
      partial, 239
      (see also functions; subroutines)
Microsoft Access, 99
Microsoft Expression Blend, 508
Microsoft FrontPage Extensions, 691
Microsoft Help 2, 673
Microsoft Intermediate Langauage (see IL)
Microsoft Knowledge Base article on raw printing support, 564
Microsoft Office
      consumer licensing agreement, 616
      integration of Visual Basic, 583
      Primary Interop Assemblies (PIA), 584
Microsoft Solutions Framework (MSF), 84
Microsoft Visual SourceSafe, 89
Microsoft Windows (see Windows systems)
Microsoft Word, 361
Microsoft.Reporting namespace, 583
Microsoft.VisualBasic namespace, 12, 35
      MsgBox method, 241
Microsoft.VisualBasic.dll assembly, 131
Microsoft.VisualBasic.Logging namespace, 429
MicrosoftReportViewer control, 583
      data sources implementing IEnumerable, 593
      downloading, 585
      integration with SQL Server Reporting Services, 584
      using in a form, 588
milestones, 86
Min function, 460
MinimumSplashScreenDisplayTime property, 214
Mod (modulo) operator, 48, 168
      overloading, 334
modal forms, 210
modeless forms, 210
modifiers (see access modifier keywords)
modules, 9, 158, 182
      namespaces, 66
      in Visual Basic, 239
money (see currency format, localizing)
mouse clicks, 66, 189
      testing for, 503
      (see also Click event)
MSBuild tool, 136
MS-DOS, 187
MSF (Microsoft Solutions Framework), 84
MsgBox procedure, 50, 241, 715
      displaying literals, 36
MsgBoxResult enumeration, 241
.msi files, 693
MSI installations, 693-698
      CD distribution, 700
      ClickOnce deployment versus, 698
      generating file for Library Project, 707
MSIL (Microsoft Intermediate Language) (see IL)
multidimensional arrays, 174
multiline statements, 52
multimedia, 507
Multiple Active Result Sets (MARS), 284
      including support in SQL Server connection string, 290
multiplication operator (see * [asterisk], under Symbols)
Must Inherit keyword, 248, 318
Must Override keyword, 248, 318
MustInherit keyword, 231, 237
      disallowing direct instantiation, 248
      Visual Studio's problem with, 318
MustOverride keyword, 231, 237
      Visual Studio's problem with, 318
My namespace, 69
      assemblies and, 132-134
      DoEvents method, 243
      file management, 424-426
      major nodes of the hierarchy, 132
My.Application.Deployment property, 699
My.Application.Info.Version, 146
My.Computer.FileSystem object
      DeleteFile method, 134
      file interaction features, 424-426
My.Forms collection, 70, 149
My.MySettings object, 397
My.Resources object, 529
My.Settings object, 398-400, 410, 685
My.User object, 311
MyApplication_Shutdown event handler, 298
MyApplication_Startup event, 297
      loading database settings, 406
      RefreshHolidays method, 447
MyBase keyword, 234
MyClass keyword, 233

N[ Top ]
Name property, My.User, 311
NameMyChild method (example), 258
names, variable, 38
namespace abbreviations, 68
Namespace statements, 69
namespaces, 11, 66-69
      ADO.NET classes, 278
      BCL and FCL classes, 13
      Global keyword and, 27
      importing, 68
      My namespace, 69
      My namespace and assemblies, 132
      in your project, 69
      WCF services, 662
      XML, 370
            including in XML content, 378
narrowing conversions, 45, 337
      implicit, generating compile-time errors, 260
Narrowing keyword, 338
navigation controls, 650
needs of users, 79-83
      commonality versus innovation, 81
      data and information, 79
      process, 80
      project-specific, 83
      usability, 80
negation operators (see - [minus sign], under Symbols; Not operator)
negative numbers, 152
nested classes, 10
nested loops, 57
nested types, 228
.NET Framework, xv, 1-29
      assemblies, 126-150
      assemblies and manifests, 13
      before .NET, 1
      benefits of, 2
      class libraries, 10-13
      CLR (Common Language Runtime), 7
      CLS (Common Language Specification), 8
      CTS (Common Type System), 9, 34
      data types and Visual Basic equivalents, 158
      history of, 31
      implementation of Visual Basic data types, 41
      lack of raw printer support, 564
      metadata and attributes, 13
      objects, 3-7
      printing system, 554-557
      Remoting, 659
      support of ASP.NET, 645
      versioning, 15
      versions supported by Visual Studio 2008, 21
      Visual Basic development process, 16
      Visual Studio 2008, 18
      Visual Studio and Visual Basic, 17
      (see also ADO.NET), 278
NetworkStream object, 419
New keyword, 28
      As New clause, 438
      assigning reference type instance to a variable, 163
      constructors, 234
      creating instances of custom classes, 232
      instantiating reference types, 42
New Project dialog (Visual Studio), 23
nodes
      .NET type hierarchy, 11
      XML document, 372
            locating, 374
non-postback events, 654
normalization, 96
not equal to operator (see < and > [angle brackets], under Symbols)
Not operator, 48, 169
      overloading, 335
Notepad, 18
Nothing value, 175
      assignment to variables, 162
      comparing reference types to, 42
      IF operator arguments evaluating to, 54
      variables created with default constructor, 235
NotInheritable keyword, 232
NotOverridable keyword, 231
NULL keyword, 104
null values, 104
      passing in SQL statements, 299
nullable types, 175
      generic, 441
      Nothing value, 163
      support for LINQ, 450
numbers
      treating as Boolean values, 37
      variables for, 34
numeric functions, 179
numeric literals, 159
      in SQL statements, 103

O[ Top ]
O/R (Object Relational) Designer, 465-467
      locating SQL Server database tables, 471
OBAs (Office Business Applications), 584
obfuscation, 17, 130, 616-618
Object class, 39, 40, 157
      Finalize method, 236
      generic type parameters, 436
      ToString method, 245
      weak typing, 434
object equal-to comparison operator (Is), 48
object initializers
      support for LINQ, 450
      using (example), 451
Object Linking and Embedding for Databases (OLE DB), 277, 280
object not-equal-to comparison operator (IsNot), 48
Object Relational Designer (see O/R Designer)
object-oriented programming (OOP), 31, 219-241
      classes in Visual Basic, 225
      interfaces and implementation, 224
      objects, 220
      On Error statement and, 270
      structured error handling, 265-267
object-oriented technologies, 2
objects, 3-7, 220
      abstraction, 220
      ASP.NET object-based technology, 645
      defined, 4
      inheritance, 222
      initializers, 259
      instances and, 6
      interfaces and, 5
      LINQ to Objects, 451
      polymorphism, 223
ODBC (Open DataBase Connectivity), 277
      implementation by Microsoft, 279
      replacement by providers in .NET, 280
Office Add-In project templates, 584
Office Business Applications (OBAs), 584
OLE DB, 277, 280
On and Equals keywords, 457
On Error GoTo statement, 265
On Error Resume Next statement, 265
      database interaction routines, 298
On Error statements, 270
      enabling or disabling error handling, 264
one-to-one relationship, 106
OnInitialize method, 214
online help, 672-688
      accessing HTML Help, 680-682
      designing HTML Help, 674-680
      Library Project (example), 683-688
      Windows, 672-674
OOP (see object-oriented programming)
Opacity property, 524
Open DataBase Connectivity (see ODBC)
Open File dialog, 411
open source applications, 612
opening tag and matching closing tag (XML), 364, 367
operands, 167
operating systems, 4
      (see also entries under individual system names)
Operator keyword, 332, 338, 339
operator overloading, 330-340, 342
      caution with, 340
      comparison operators, 334
      CType operator, 336
      declarations, 339
      mathematical operators, 333
      other issues, 338
      overloading overloaded operators, 340
operators, 47, 167-172
      assignment, 171
      binary, 47
      combining, operands as complex expressions, 49
      as functions, 331
      grouping operands by, using expression trees, 256
      LINQ, 452, 454
            extension methods corresponding to, 461
      summary of, 168-171
Option Compare statement, 46
Option Explicit statement, 45
Option Infer On statement, 256
Option Infer statement, 46
Option Infer statements, turning type inference on or off, 167
Option statements, 45
Option Strict On statement, 233, 256
      implicit narrowing conversions generating errors, 260
Option Strict statement, 45
optional arguments, 50
Optional keyword, 230
options (SQL Server), 101
OR keyword, 104
Or operator, 48, 169
      overloading, 335
Oracle, 279
OracleClient class, 278
Order By clause, LINQ queries, 456
ORDER BY clause, SELECT statement, 105
OrElse operator, 48, 169
      overloading, 336
OUTPUT INSERTED clause, 292
overloaded subroutines, 50
overloading, 224
      generic types and members, 440
Overloads keyword, 229
      overloading overloads and, 340
Overridable keyword, 231
Overrides keyword, 231
overriding
      inherited base class members, 222
      MustOverride keyword, 237
owner draw, 488
      enhancing controls, 505

P[ Top ]
page directive (ASP.NET), 648
Page_Load event, 654
pages, counting and numbering for printing, 561
PageSetupDialog control, 554
paging results, LINQ queries, 458
Paint event, 489
      bar code label preview control, 522
      PictureBox control, 494
ParamArray arguments, 243
parameters
      property, 60
      subroutine, 58
parent-child relationship, database tables, 106
partial classes, 225
Partial keyword, 27, 225
partial methods, 239
      restrictions on, 240
      support for LINQ, 450
      using event system instead of, 241
Pascal, 49
Pascal Casing, 166
passing by value or by reference, 58
Password reserved keyword, 542
passwords
      encrypting (example), 312-328
      generation on Unix systems, 303
      SQL Server, 290
paths, graphics, 488, 501
      using to establish custom clipping region, 502
pattern comparison (Like) operator, 48, 170
      overloading, 335
PDF-like static document, 507
PE (Portable Execution) files, 128
Peek method, Stack class, 441
pens, 488
      creating, 490
      disposing of properly, 490
      Pen object, 490
      predefined, 490
      System.Drawing.Pens class, 490
period (.)
      separating nodes in type hierarchy, 11
      (see also . [dot], under Symbols)
persisted settings, 399
personal computers (PCs), 1
pessimistic concurrency, 279
physical data model, abstraction into logical view, 463
PIA (Primary Interop Assemblies), 584
PictureBox control, 213
      Paint event handler, 493
      properties, 494
planning
      design and, 85
      importance in programming mindset, 716
PNG files, 497
polymorphism, 223
pop-up help, 681
Portable Execution (PE) files, 128
Portable Network Graphics ("PNG") files, 497
Position property, Stream object, 418
postback events, 654
PostScript, 553
presentation, separation from logic in application design, 508
PreviousPage object, 668
Primary Interop Assemblies (PIA), 584
primary key, 96
PRIMARY KEY clause, CREATE TABLE statement, 101
PrintDialog control, 554, 558
PrintDocument class, 554, 557, 582
      document page numbers and, 561
      field-level instance, With Events clause in definition, 554
      PrinterSettings.PrintRange property, 561
      PrintPage event handler, 561
printers, installed, 409
PrinterSettings class, 557
      PrintRange property, 561
printing, 552-580
      counting and numbering pages, 561
      in .NET, 554-557
      print preview, 559
      printer controls for Windows Forms, 554
      printer languages, 553
      program that prints a document, 557-559
      in raw mode, 563
      Windows printer drivers handling printer variations, 553
PrintPage event handler, 559, 561
      modifying code determining when to quit print process, 563
PrintPreviewControl class, 555
PrintPreviewDialog class, 554, 560
Private modifier, 44
      assemblies, 126
      base class members, 223
      variables, 164
procedural languages, 49
procedure-level scope, 165
procedures, 35
      creating your own, 57-61
      placement of, 61
      variables and constants declared outside of, 164
      variables and constants declared within, 164
      window (see WndProc)
process, 80
Process object, 145
      Start method, 390
processing of data, 4
Professional Edition of Visual Studio 2008, 19
professional version of an application, 134
programming
      basic tasks performed by computers, 4
      unified environment in .NET, 2
programming languages
      lambda calculus, use of, 253
      .NET, 2
programming mindset, 716
programs
      examples in this book, xvi
      source code for examples in this book, xvii
      using code examples from this book, xviii
project acceptance document, 89
project approval document, 87
project design document, 85
project goals, 85
project kickoff, 84
project lifecycle, 83-89
      acceptance criteria testing, 88
      acceptance of the project, 89
      approval of design document, 86
      changes to the project, 87
      deployment and distribution, 89
      design and planning, 85
      development phase, 87
      documentation, proper and complete, 84
      kickoff meeting, 84
      ongoing support, 89
      project approval document, 87
      project goals, 85
project management, 83
      cyclical and linear approaches, 84
project methodology framework, 83
projects in Visual Basic
      (see also Library Project)
project-specific user needs, 83
Prompt parameter, MsgBox, 241
properties, 4, 50, 60
      class, 227
      class sub methods and, 226
      controls, 288
      form, 195-197
      object, 221
      XML axis properties, 377
Properties panel (Visual Studio), 15, 24, 139
      setting form properties, 139
Property keyword, 61
PropertyBinding property, 400
PropertyGrid control, 511, 518
      attributes added to class properties, 511
      ItemProperties control instance, 522
proprietary binary formats, 361
Protected access modifier
      base class members, 223
      variables, 164
Protected Friend variables, 164
prototypes, 87
providers
      ADO.NET, 279-281
            supporting using Entity Framework, 294
      LINQ, 451
pseudocode, 33
public key encryption, 305, 309
Public keyword
      in operator declarations, 332
      operator overload declarations, 339
public members, 5
Public modifier, 44
      assemblies, 127
      variables, 164
public-key encryption
      (see also cryptography)
publishing a site to the production server, 691
publishing process for applications, 699
Push and Pop methods, Stack class, 440
Python, 22

Q[ Top ]
queries, LINQ, 452
query clauses, 453
Query Designer (SQL Server), 598
query expressions, 450
      advanced, 460
      basic, 453-458
query languages, 97
      (see also LINQ; SQL; SQL Server)
QueryPageSettings event, 559
quotation marks (see under Symbols)

R[ Top ]
Raise method, Err object, 270
range variables, 453
RangeValidator, 655
"raw" mode, communication with printers, 563
RC2 (Rivest Cipher number 2), 307
RC2CryptoServiceProvider class, 307
.rdlc files, 586
RDLC Report Viewer control, 657
RDLC reports, 586-597
      adding data source, 585
      adding page header and footer, 590
      data grouping and sorting support, 591-593
      data region controls, 587
      designing report surface, 587
      report schema, 599
      running, 589
      style formating, 592
      supplying custom data sources, 595-597
      using a report control, 588
      using custom data, 593
RDO (Remote Data Objects), 277
readers and writers of stream data, 420
ReadOnly or WriteOnly keyword, 61
records, 95
recursion, 315
reference types, 9, 39
      assignment to System.Object instance, 158
      declaration, 42
      differences from value types in usage, 157
      instantiation, 41, 42
      passing by value or by reference, 58
      System.Object, 157
references
      assembly manifest, 129
      between database tables, 101
REFERENCES constraint, 123
REFERENCES option clause, CREATE TABLE statement, 101
referential integrity, 323
reflection, 131
Refresh method, 242
#Region directive, 134
regions, 502
      establishing custom clipping region, 502
      using in hit testing, 503
registry, 393
Registry Editor, 697
RegularExpressionValidator, 655
relational algebra, 97
relational databases, 95, 109
      ADO.NET, 278
      vendor-specific systems, 97
relationships
      ADO.NET Entity Framework, 293
      table, 106
Reload method, Settings object, 399
reloading web pages, 654
REM keyword, 45
RemoveHandler statements, 209
reporting, 581-610
      Crystal Reports, 583
      integration with Microsoft Office, 583
      PrintDocument-based printing, 582
      report output on a printer, 487
      services and controls, 583
      using .NET reporting controls, 584-597
      using HTML/Web pages, 582
      using XPS documents, 582
reporting controls, 650
Reporting namespace, 583
ReportViewer class, 583
      creating a simple report, 584
      (see also Microsoft ReportViewer control)
RequiredFieldValidator, 655
Reset method, Settings object, 399
resgen.exe utility, 535
resource files, 16, 527
resource generation, 528
Resource Kit, 109
ResourceManager class, 530
resources, 213, 527
      adding outside Visual Studio, 534
      cleaning up, 237
      generating and compiling manually, 535-537
.resources files, 536
Resources object, 529
Resources.resx file, 530
response variable, 38
Resume Next statement, 265
.resx files, 528
Return statements, 63, 715
return values, 49
      lambda expression, 254
Rich Text Format (RTF), 673
right outer joins, 106
Rijndael encryption algorithm, 307
Rivest Cipher number 2 (RC2), 307
Rollback method, 293
root element, 365
root namespace, 69
root nodes, .NET namespaces, 11, 12
rotation transformations, 503, 523
rows, 95
RSA algorithm, 309
RSA class, 624
RSACryptoServiceProvider class, 309, 624
RTF (Rich Text Format), 673
Ruby, 22
Run method, Application class, 191
runat="server" attributes, 651
runtime agility, 715
runtime errors, 261

S[ Top ]
satellite assemblies, 528
      compiling manually from .resx files, 535-537
Save method, Settings class, 399
SaveMySettingsOnExit flag, 399
SayHello class (example), 72
      private fields, 72
SByte data type, 40, 154
schedules, 85
      approval of proposed schedule, 87
      changes in, 87
schemas, XML, 368-370
      for XML literals, 378
      verification, 374
scope
      aid of project goals in determining, 85
      block-level, for variables, 165
      change in, 87
      variables, 165
scope creep, 88
screen scraping, 658
screen updates, 242
secret key cryptography, 307
secrets, 303
security, 303-329
      authentication and My.User, 311
      cryptography and encryption, 304-311
      enhancements from .NET, 3
      highest level, with software use, 614
      .NET features, 304
      SecureString class, 312
Select Case statements, 52
      KeyDown event handler, 217
      window procedures, 190
Select clause, LINQ queries, 454
SELECT statements, 97, 104, 598
      SQL query, 599
      WHERE clause, 599
SelectedObject property, 511
self-describing (.NET applications), 136
servers, standalone, 279
server-side scripting, 644
server-side validation, 656
Service class, 660
service release updates, 89
ServiceContract attribute, 660
services, WCF, 659-662
      providing named access to, 662
      requesting, 661
Set accessor, 60
SET clause, UPDATE statement, 104
Settings object, 398-400, 410, 685
Settings.Designer file, 396
Settings.settings file, 394, 396
      WarningLimit and NoticeFont settings, 398
setup project, building, 693-698
Setup Wizard, 693, 700
Setup.exe file, 708
SHA-1 hash algorithm, 311
SHA1Managed class, 311
shadowed members, 232
Shadows keyword, 232
shape controls, 140
shapes
      GDI drawing elements, 488
      transformations, 503
shared class members, 228
Shared keyword, 229, 338
      in operator declarations, 332
      operator overload declarations, 339
shift operators (see < and > [angle brackets], under Symbols)
Short data type, 40
shortcuts
      desktop, 703
Show method, 194
      MessageBox class, 242
ShowDialog method, Form class, 210
ShowHelp method, 682, 684
Shutdown event for applications, 298
side-by-side installation, 16, 400
signed integers, 154
SignedXml class, 625, 631
Silverlight platform, 507
      Microsoft.VisualBasic and, 242
Single data type, 40, 155
single-instance applications, 218
single-line statements, 52
Skip clause, LINQ queries, 458
Sleep function, 214
smallint data type, 101
Smart Tags, 200
SOAP (Simple Object Access Protocol), 659
software
      development of, 87
      licensing options, 611
      (see also licensing)
software for this book
      download, contents of, xvii
      installing, 719-721
      license agreement, 722
solid brushes, 491
Solution Explorer (Visual Studio), 24, 139
sorting
      binary and text string comparisons, 46
      report data, 592
source code, 34
      control systems, 89
      controlling the user experience, 289
      dividing a single class among multiple files, 27
      example programs from this book, xvii
      files with a .vb extension, 16
      including/excluding using directives, 134
      using examples from this book, xviii
      Visual Basic code behind ASP.NET page, 646
      Visual Studio and Visual Basic, 17
spaghetti code, resulting from overuse of GoTo statements, 62
specifications, 86
Split function, 185
SQL (Structured Query Language), 97, 100-107
      AS keyword, 453
      beyond basics, 106
      building statements, 598-600
      DDL statements, 100-103
      DML statements, 103-106
      influence on database industry, 109
      routines preparing data for SQL statements or retrieved data, 299
      using SQL statements in SQL Server, 290
SQL Query Debug Visualizer tool, 468
SQL Server, 279
      connecting to entities instead of, 294
      connecting to, using Visual Studio, 284-289
      connection string, building, 289
      data types, 101
      database instance name, 665
      database transactions, 292
      establishing a connection, 290
      help, 673
      LINQ to SQL, 464-468
      modifying data, 291
      processing results from, 291
      Reporting Services, 583, 584
      using SQL statements, 290
SQL Server 2005, xvii, 19, 98
      Management Studio Express, 123
SQL Server 2008, 20, 98
SQL Server Management Studio, 99
SQL Server Management Studio Express, 99
      Query Designer, 598
      query features, 360
SQLClient class, 278
SqlCommand object, 290
      ExecuteScalar method, 292
      Transaction property, 293
SqlConnection object, 290
SqlDataReader object, 291
      extending, 345, 473
SqlMetal.exe tool, 465
SqlTransaction object, 292
stacks, 478
      Stack class, 440
      Stack(Of T) generic class, 441
standalone servers, 279
standard controls, 649
Standard Edition of Visual Studio 2008, 19
standards, use in .NET Framework, 3
Start method, Process object, 145
Startup event for applications, 213, 297
startup options, Windows Forms applications, 193
StartupNextInstance event handler, 218
state, 395
      retaining in a web page, 655
statement keywords, 52
statements, 34
      block statements, 165
      Option statements, 45
      (see also SQL)
static variables, 172
Stop statements, 64
storage of data, 4
StrDup function, 38
StreamReader class, 421
      implementing with a custom function, 423
streams, 309, 418-424
      example code, moving data into/out of a memory stream, 419
      readers and writers of stream data, 420
      reading a file via, 422
      Stream object, 418
StreamWriter class, 421
String class, 41, 156
      built-in methods returning modified string instance, 341
      constructors, 42, 163
      extending, 341
      references types, derivation from, 157
      System.String class properties and methods, 181
string concatenation operator (see & [ampersand], under Symbols)
string literals, 36
      in SQL statements, 103
StringBuilder class, 480, 570
StringFormat class, 515
StringReader class, 421
strings
      binary and text comparisons, 46
      default constructors, 42
      functions for string manipulation, 179
            Library Project (example), 183-186
      immutability in .NET, 156
      literal, 36
      preparing for printing, 567
      in resource files, 528
      SecureString class, 312
StringWriter class, 421
strong name (assemblies), 13, 127, 129
strongly typed languages, 166
structured error handling, 265-269
      mixing with unstructured error handling, 270
structures, 9, 153
      implementation of value types, 239
      namespaces, 66
      support by value types, 158
      user-defined types, 10
Sub declaration statement, 58
Sub Main procedure, 194
sub methods, 226
subroutines, calling indirectly through events, 64
subtraction operator (see - [minus sign], under Symbols)
Sum function, 460
      use in LINQ aggregate query, 459
summary form, generic, 250-252
SuppressFinalize method, 237
surfaces
      adding report design surface, 586
      drawing surfaces, generalized by GDI+, 488
.svc files, 659
symmetric cryptography, 305, 307
system events, 66
system message queue, 189
System namespace, 11, 66
      core data types, 39
      data types implemented as classes, 153
system testing, 88
System.Collections namespace, 440
System.Collections.Generic namespace, 441
System.Collections.Stack class, 440
System.Data namespace, 278, 295
System.Data.Linq.Mapping namespace, 468
System.Data.OracleClient namespace, 278
System.Data.SqlClient namespace, 278
System.DateTime class, 178
System.DayOfWeek enumeration, 162
System.Decimal data type, 155
System.Diagnostics namespace, 145
System.dll, 68, 131
System.Double data type, 155
System.Drawing namespace, 487
System.Drawing.Font class, 493
System.Drawing.Graphics class, 488
System.Drawing.Pens class, 490
System.Drawing.Point setting, 400
System.Drawing.Printing.PrintDocument class, 554
System.Drawing.Printing.PrinterSettings class, 557
System.Drawing.Text.InstalledFontCollection, 409
System.EventArgs class, 144, 206, 207
System.Exception class, 271
System.Globalization namespace, culture management features, 538
System.IO namespace
      readers and writiers of stream data, 420
      Stream object, 418
System.Linq.Expressions namespace, 256
System.Math class, 179
System.Object class, 39, 157
      generic type parameters, 436
      weakly typed, 434
      (see also Object class; objects)
System.Reflection namespace, 131
System.Runtime.CompilerServices namespace, 341
System.Security.Cryptography namespace, 306, 316
System.Security.Cryptography.RSA class, 624
System.Security.Cryptography.Xml namespace, 627
System.Security.SecureString class, 312
System.Single class, 155
System.String class, 42, 181
      (see also String class; strings)
System.Timers namespace, 66
System.ValueType class, 41, 157, 239
System.Version class, 146
System.Windows.Forms namespace, 68, 191, 193
System.Windows.Forms.Application.Run method, 191
System.Windows.Forms.Control class, 191, 197
System.Windows.Forms.dll, 68
System.Windows.Forms.Form class, 142
System.Windows.Window class, 509
System.Xml namespace, 295, 371
System.Xml.Linq namespace, 371, 376
System.Xml.XPath namespace, 374

T[ Top ]
tab order, 141
tables, 95
      abbreviations for names, 105
      joining, 97, 105
      (see also database tables)
Tag Image File Format ("TIFF") files, 497
tags
      ASP.NET, 651
      XML, 366
Take clause, LINQ queries, 458
Take While clause, LINQ queries, 458
Team Foundation Server, 20
Team System 2008, Visual Studio, 20
Technical Resource Kit, 109
television (TV), considered as an object, 5
Telnet program, 643
templates
      chapter-specific project templates, 23
      installing project templates for this book, 720
ternary operator (If), 54
testing (acceptance criteria), 88
text
      aligning with bounding box, 523
      comparisons, 46
      data types, 156
      before graphical user interfaces, 493
      placing on graphics surface, 493-496
      string data, 34
      transformations before output to graphics surface, 503
      variables for, 34
TextBox controls
      adding to report header and footer, 590
      ASP.NET, TextChanged event, 653
      Color property, 593
TextReader class, 421
texture brushes, 491
TextWriter class, 421
The Rule (XML), 367
Then keyword, 51
Throw statement, 270
TIFF files, 497
Timer control, 191
ToArray method, 459
ToDictionary method, 459
ToList method, 459
ToLower method, String class, 341
toolbox (Visual Studio), 138
ToString method, 245
      ListBox control, 382
ToUpper method, String class, 341
TRACE constant, 136
Transaction property, SQLCommand object, 293
transactions, 292
transformations
      geometric, of graphics objects, 503
      rotations, 523
      (see also XSLT)
transparency
      setting level, 491
      slowly increasing for, 524
Trim function, 184
Trimming property, StringFormat class, 515
Triple DES encryption algorithm, 307
True value, 37
      conversion to integers, 157
TrueType fonts, 512
Try clause, Try . . . Catch . . . Finally statement, 266
Try . . . Catch . . . Finally statement, 266
T-SQL scripting language, 98
TV considered as an object, 5
type (data values), 36
type inference, 376
      combining with lambda expressions, 255
      use by anonymous types, 451
type parameters, 436
typed data sets, 282, 464
TypeOf operator, 171
types, 9
      CTS (Common Type System), 9
      namespace referencing, 67
      placing in subordinate namespaces from root namespace, 69
      variable, 38
      (see also data types)

U[ Top ]
UInt16 data type, 154
UInt32 data type, 154
UInt64 data type, 154
UInteger class, 41
ULong class, 41
unary negation operator (see - [minus sign], under Symbols)
unary operators, 47, 167, 331
unary plus operator (see + [plus sign], under Symbols)
unhandled errors, 267
      bubbling up the call stack, 268
UnhandledException method, 276
Unicode, 153
      String data type and, 156
UnicodeEncoding object, GetBytes method, 317
unidirectional encryption, 306
unit testing, 88
unmanaged code, 7
      winspool.drv library,