Cover image for MCAD / MCSD self-paced training kit    developing windows-based applications with microsoft visual basic .NET and microsoft visual C# .NET
Title:
MCAD / MCSD self-paced training kit developing windows-based applications with microsoft visual basic .NET and microsoft visual C# .NET
Publication Information:
Redmond, Washington : Microsoft Press, 2002
ISBN:
9780735615335

Available:*

Library
Item Barcode
Call Number
Material Type
Item Category 1
Status
Searching...
30000003605650 QA76.3 M33 2002 Open Access Book Book
Searching...

On Order

Summary

Summary

Key Book Benefits: - NEW--Delivers revised and expanded content for developing Windows-based applications with the .NET Framework. - NEW--Features enhanced testing tool that generates realistic practice exams with automated scoring and detailed explanations for right and wrong answers. - Thoroughly covers the objectives for two MCP Exams--70-306 and 70-316--core requirements on the MCAD/MCSD tracks - Provides side-by-side code examples and labs for both Visual Basic .NET and Visual C# .NET - Includes 60-day evaluation version of Microsoft Visual Studio(R) .NET Professional Edition on DVD


Table of Contents

About This Bookp. xiii
Chapter 1 Introduction to the .NET Frameworkp. 1
About This Chapterp. 1
Before You Beginp. 1
Lesson 1 The .NET Framework and the Common Language Runtimep. 2
Overview of the .NET Frameworkp. 2
Languages and the .NET Frameworkp. 2
The Structure of a .NET Applicationp. 3
Compilation and Execution of a .NET Applicationp. 4
Lesson 2 The .NET Base Class Libraryp. 6
Reference Types and Value Typesp. 8
Using .NET Framework Types in Your Applicationp. 9
The Imports and using Statementsp. 12
Referencing External Librariesp. 13
Lesson 3 Using Classes and Structuresp. 15
Membersp. 15
Creating Classesp. 16
Creating Structuresp. 16
Adding Membersp. 16
Nested Typesp. 17
Instantiating User-Defined Typesp. 18
Classes vs. Structuresp. 19
Lesson 4 Using Methodsp. 20
Adding Methodsp. 20
Calling Methodsp. 21
Method Variablesp. 21
Parametersp. 22
Constructors and Destructorsp. 25
Lesson 5 Scope and Access Levelsp. 28
Member Access Modifiersp. 28
Type Access Modifiersp. 30
Access Modifiers for Nested Typesp. 31
Shared (static) Membersp. 31
Lesson 6 Garbage Collectionp. 34
Circular Referencesp. 35
Lab 1 Classes and Garbage Collectionp. 37
Before You Beginp. 37
Exercise 1.1 Making the Demo Classp. 37
Exercise 1.2 Demonstrating Garbage Collectionp. 38
Reviewp. 40
Chapter 2 Creating the User Interfacep. 41
About This Chapterp. 41
Before You Beginp. 41
Lesson 1 User Interface Design Principlesp. 42
Forms, Controls, and Menusp. 42
Compositionp. 43
Lesson 2 Using Formsp. 47
Adding Forms to Your Projectp. 47
Visual Inheritancep. 48
Setting the Startup Formp. 50
Setting the Startup Locationp. 51
Changing the Appearance of Your Formp. 52
BackColor, ForeColor, and Text Propertiesp. 53
Font, Cursor, and BackGroundImagep. 53
Opacityp. 53
Using Form Methodsp. 54
Show and ShowDialogp. 55
Activatep. 55
Hidep. 56
Closep. 56
Using Form Eventsp. 56
Form Lifetime Eventsp. 58
Lesson 3 Using Controls and Componentsp. 62
Working with Controlsp. 62
Setting the Control Tab Orderp. 64
Controls That Can Contain Other Controlsp. 65
Docking and Anchoring Controlsp. 66
Using the Controls Collectionp. 69
Adding Controls to the Toolboxp. 70
Creating Event Handlers for Controlsp. 71
Using Extender Provider Componentsp. 72
Lesson 4 Using Menusp. 75
Creating Menus at Design Timep. 75
Using the MainMenu Componentp. 76
Separating Menu Itemsp. 77
Menu Access and Shortcut Keysp. 78
Using Menu Item Eventsp. 79
Creating Context Menusp. 79
Modifying Menus at Run Timep. 80
Enabling and Disabling Menu Commandsp. 80
Displaying Check Marks on Menu Itemsp. 80
Displaying Radio Buttons on Menu Itemsp. 80
Making Menu Items Invisiblep. 81
Cloning Menusp. 81
Merging Menus at Run Timep. 82
Adding Menu Items at Run Timep. 82
Lesson 5 Validating User Inputp. 84
Field-Level Validationp. 84
Using Events in Field-Level Validationp. 86
Handling the Focusp. 88
Form-Level Validationp. 90
Providing User Feedbackp. 92
Lab 2 The Virtual Doughnut Factoryp. 96
Before You Beginp. 96
Exercise 2.1 Creating the User Interfacep. 96
Exercise 2.2 Adding a Menup. 100
Exercise 2.3 Creating Validation Handlersp. 101
Reviewp. 104
Chapter 3 Types and Membersp. 105
About This Chapterp. 105
Before You Beginp. 105
Lesson 1 Using Data Typesp. 106
The .NET Data Typesp. 106
Converting Typesp. 109
Using Data Type Functionalityp. 112
Lesson 2 Constants, Enums, Arrays, and Collectionsp. 116
Constants and Enumerationsp. 116
Arraysp. 120
Collectionsp. 124
Enumerating the Members of an Array or Collectionp. 127
Lesson 3 Implementing Propertiesp. 130
Implementing Propertiesp. 130
Read-Only and Write-Only Propertiesp. 133
Parameterized Propertiesp. 134
Default Properties and Indexersp. 135
Collection Propertiesp. 136
Lesson 4 Implementing Delegates and Eventsp. 140
Delegatesp. 140
Declaring and Raising Eventsp. 142
Implementing Event Handlersp. 143
Event Handlers That Handle Multiple Eventsp. 145
Events with Multiple Handlersp. 146
Removing Handlers at Run Timep. 146
Lab 3 Adding Components and Implementing Membersp. 148
Before You Beginp. 148
Exercise 3.1 Creating the DoughnutMachine Componentp. 148
Exercise 3.2 Adding the DoughnutMachine to the User Interfacep. 155
Reviewp. 160
Chapter 4 Object-Oriented Programming and Polymorphismp. 161
About This Chapterp. 161
Before You Beginp. 161
Lesson 1 Introduction to Object-Oriented Programmingp. 162
Objects, Members, and Abstractionp. 162
Encapsulationp. 164
Polymorphismp. 164
Lesson 2 Overloading Membersp. 167
Creating Overloading Methodsp. 168
Overloading Operators with Visual C#p. 169
Lesson 3 Interface Polymorphismp. 172
Defining Interfacesp. 172
Polymorphism with Interfacesp. 174
Implementing Interfacesp. 175
Lesson 4 Inheritance Polymorphismp. 180
Inheritancep. 180
Inherited Membersp. 182
Abstract Classes and Membersp. 189
Lab 4 Using Inherited Classesp. 193
Before You Beginp. 193
Exercise 4.1 Creating a Strongly Typed Collection Class by Extending CollectionBasep. 193
Exercise 4.2 Implementing Additional Doughnut Typesp. 196
Exercise 4.3 Implementing the RemoveStale Methodp. 199
Reviewp. 204
Chapter 5 Testing and Debugging Your Applicationp. 205
About This Chapterp. 205
Before You Beginp. 205
Lesson 1 Using the Debugging Toolsp. 206
Types of Errorsp. 206
Break Modep. 208
Setting Breakpointsp. 211
Using the Debugging Windowsp. 213
Lesson 2 Using the Debug and Trace Classesp. 218
How Tracing Worksp. 218
Writing Trace and Debug Outputp. 219
The Listeners Collectionp. 221
Using Trace Switchesp. 223
Configuring Trace Switchesp. 226
Lesson 3 Creating a Unit Test Planp. 229
The Unit Test Planp. 229
Lesson 4 Handling and Throwing Exceptionsp. 234
How Exceptions Are Handledp. 234
Creating an Exception Handlerp. 235
Throwing Exceptionsp. 239
Lab 5 Debugging an Applicationp. 244
Before You Beginp. 244
Exercise 5.1 Identifying Syntax Errorsp. 244
Reviewp. 248
Chapter 6 Data Access Using ADO.NETp. 249
About This Chapterp. 249
Before You Beginp. 249
Lesson 1 Overview of ADO.NETp. 250
Disconnected Database Accessp. 250
ADO.NET Data Architecturep. 251
Lesson 2 Accessing Datap. 255
Connecting to a Databasep. 255
Using Data Commandsp. 258
Using DataReadersp. 264
Creating and Configuring DataAdaptersp. 271
Retrieving Data Using DataAdaptersp. 273
Lesson 3 Using DataSet Objects and Updating Datap. 280
Creating and Filling DataSet Objects Without a DataAdapterp. 280
DataRelation Objectsp. 285
Constraintsp. 286
Editing and Updating Datap. 289
Lesson 4 Binding, Viewing, and Filtering Datap. 297
Data Bindingp. 297
Filtering and Sorting Datap. 305
Lesson 5 Using XML in ADO.NETp. 311
Retrieving XML from a SQL Server 2000 Databasep. 311
Using XML with DataSetsp. 312
Using the XmlDataDocument Classp. 314
Lab 6 Connecting with a Databasep. 319
Before You Beginp. 319
Exercise 6.1 Adding Data Access and Using the DataReaderp. 319
Exercise 6.2 Retrieving and Updating Data Using DataAdapter Objects and a DataSetp. 321
Exercise 6.3 Creating a Typed DataSet Using the XML Designerp. 323
Exercise 6.4 Using the Data Form Wizardp. 325
Reviewp. 328
Chapter 7 Creating Controls Using the .NET Frameworkp. 329
About This Chapterp. 329
Before You Beginp. 329
Lesson 1 Using GDI+p. 330
The System.Drawing Namespacesp. 330
The Graphics Objectp. 331
Colors, Brushes, and Pensp. 335
Rendering Simple Shapesp. 338
Rendering Textp. 339
Rendering Complex Shapesp. 340
Lesson 2 Authoring Controlsp. 344
Overview of Control Authoringp. 344
Creating an Inherited Controlp. 347
Creating a User Controlp. 349
Creating a Custom Controlp. 352
Lesson 3 Common Tasks Using Controlsp. 355
Adding Your Control to the Toolboxp. 355
Providing a Toolbox Bitmap for Your Controlp. 355
Debugging Your Controlp. 357
Managing Control Licensingp. 358
Hosting Your Control in Internet Explorerp. 360
Lab 7 Creating a Custom Controlp. 362
Before You Beginp. 362
Exercise 7.1 Creating the Controlp. 362
Exercise 7.2 Testing Your Controlp. 367
Reviewp. 369
Chapter 8 Advanced .NET Framework Topicsp. 371
About This Chapterp. 371
Before You Beginp. 371
Lesson 1 Implementing Print Functionalityp. 372
The PrintDocument Componentp. 372
Printing Contentp. 375
Using PrintPreviewControlp. 381
Configuring Printingp. 382
Lesson 2 Accessing and Invoking Componentsp. 386
Accessing .NET and COM Type Librariesp. 386
Instantiating ActiveX Controlsp. 388
Accessing a Web Servicep. 388
Accessing the Windows APIp. 392
Lesson 3 Implementing Accessibilityp. 395
Accessibility Designp. 395
Accessibility and the Certified for Windows Programp. 396
Accessibility Properties of Windows Forms Controlsp. 397
Lesson 4 Implementing Help in Your Applicationp. 399
The Help Classp. 399
The HelpProvider Componentp. 400
Lesson 5 Globalization and Localizationp. 402
Globalization and Localizationp. 402
Culture-Specific Formattingp. 407
Lab 8 Creating a Localized Form with Print Supportp. 413
Before You Beginp. 413
Exercise 8.1 Creating the Formp. 413
Exercise 8.2 Localizing the Formp. 416
Exercise 8.3 Adding Print Supportp. 419
Reviewp. 422
Chapter 9 Assemblies, Configuration, and Securityp. 423
About This Chapterp. 423
Before You Beginp. 423
Lesson 1 Assemblies and Resourcesp. 424
Assembliesp. 424
Resources and Resource Assembliesp. 427
Shared Assembliesp. 433
Lesson 2 Configuring and Optimizing Your Applicationp. 437
Creating the Configuration Filep. 437
Configuring Your Application Using Dynamic Propertiesp. 439
Optimizing Your Application's Performancep. 443
Lesson 3 Securing Your Applicationp. 446
Permissionsp. 447
Configuring Role-Based Authorizationp. 447
Configuring Code Access Securityp. 452
Using Exception Handling with Imperative Securityp. 459
Lab 9 Configuring and Securing an Applicationp. 461
Before You Beginp. 461
Exercise 9.1 Adding the Configuration Filep. 461
Exercise 9.2 Securing Your Applicationp. 463
Reviewp. 466
Chapter 10 Deploying Your Applicationp. 467
About This Chapterp. 467
Before You Beginp. 467
Lesson 1 Planning the Deployment of Your Projectp. 468
XCOPY Deploymentp. 468
Creating Setup Projectsp. 469
Configuring Build Properties of Your Setup Projectp. 473
Building, Distributing, and Deploying a Setup Projectp. 477
Lesson 2 Configuring Your Setup Projectp. 481
Setting the Setup Project Propertiesp. 481
The Installation Editorsp. 483
Installing a Native Assembly Imagep. 495
Verifying Installed Assembly Security Policiesp. 496
Lab 10 Creating an Installer Applicationp. 498
Before You Beginp. 498
Exercise 10.1 Creating the Setup Projectp. 498
Exercise 10.2 Configuring Your Applicationp. 499
Exercise 10.3 Installing Your Applicationp. 499
Reviewp. 501
Appendix A Questions and Answersp. 503
Glossaryp. 515
Indexp. 523