Microsoft Visual C# 2005: Developing Applications Table of Contents

Similar documents
Developing Applications Using Visual Basic 2008: Volume 2

Learning to Program in Visual Basic 2005 Table of Contents

Microsoft Visual Basic 2005: Developing Applications Additional Topics

C# Syllabus. MS.NET Framework Introduction

Microsoft ASP.NET Using Visual Basic 2008: Volume 1 Table of Contents

Developing Classic Windows Forms applications using Visual Studio 2010 and.net QASMTNET4

Chapter 12: Using Controls

ASP.NET Using Visual C# 2005: Additional Topics Table of Contents

C# 2008 and.net Programming for Electronic Engineers - Elektor - ISBN

Microsoft ASP.NET Using Visual C# 2008: Volume 2 Table of Contents

Developing Microsoft.NET Applications for Windows (Visual Basic.NET)

Programming with ADO.NET

Chapter 12: Using Controls

.NET FRAMEWORK. Visual C#.Net

Vision V sion o n I n n 1975 V sion o n T o T d o a d y A c o c m o pu p t u er e o n o n e v e e v r e y E po p w o er e p e p o e p o l p e

DOT.NET MODULE 6: SILVERLIGHT

ADO.NET Using Visual Basic 2005 Table of Contents

B.V Patel Institute of Business Management, Computer & Information Technology

Migrate Your Skills to Microsoft.NET Framework 2.0 and 3.0 using Visual Studio 2005 (C#)

(C#) - Pro: Designing and Developing Windows Applications Using the Microsoft.NET Framework 3.5

PROGRAMMING WITH THE MICROSOFT.NET FRAMEWORK USING MICROSOFT VISUAL STUDIO 2005 Course No. MS4995A 5 Day PREREQUISITES COURSE OUTLINE

Upgrade: Transition Your MCPD Windows Developer Skills to MCPD Windows Developer 3.5 Instructor: Peter Thorsteinson (VB)

Contents. Using Interpreters... 5 Using Compilers... 5 Program Development Life Cycle... 6

Introduction to Programming Microsoft.NET Framework Applications with Microsoft Visual Studio 2005 (C#)

ASP.NET 2.0 p. 1.NET Framework 2.0 p. 2 ASP.NET 2.0 p. 4 New Features p. 5 Special Folders Make Integration Easier p. 5 Security p.

Introduction to Microsoft.NET Framework Programming using VS 2005 (C#)

SECURED PROGRAMMING IN.NET DETAILED TRAINING CONTENT INDUSTRIAL TRAINING PROGRAM ( )

Dive Into Visual C# 2010 Express

Deitel Series Page How To Program Series

Introductionto the Visual Basic Express 2008 IDE

DOT NET SYLLABUS FOR 6 MONTHS

PESIT- Bangalore South Campus Hosur Road (1km Before Electronic city) Bangalore

James Foxall. Sams Teach Yourself. Visual Basic 2012 *24. Hours. sams. 800 East 96th Street, Indianapolis, Indiana, USA

10/18/2010 ' ( )* +, ('')* +, !" #$ % !""#$

6 Months Training Module in.net Module 1-Total Days-20

Chapters and Appendix F are PDF documents posted online at the book s Companion Website (located at

COPYRIGHTED MATERIAL. Contents. Part I: C# Fundamentals 1. Chapter 1: The.NET Framework 3. Chapter 2: Getting Started with Visual Studio

Chapters are PDF documents posted online at the book s Companion Website (located at

Using Visual Basic Studio 2008

Beginning Silverlight 5 in C #

Index. B base classes creating, , 389 inheriting, inheriting in new classes, 390

Introduction to using Visual Studio 2010 to build data-aware applications

Chapter 3. Windows Database Applications The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill

Dive Into Visual C# 2008 Express

Ingegneria del Software T. Interfaccia utente

About the Authors Introduction p. 1 Exploring Application Architectures p. 9 Introduction p. 9 Choosing the "Right" Architecture p.

Creating custom reports is for advanced users only. It is the sole responsibility of the user to debug any custom reports.

Contents. Illustrations. 1 Introduction to Computers, the Internet, the Web and C# 1

Table Of Contents VISUAL BAISC 2005 FOR BEGINNERS

.NET-6Weeks Project Based Training

Coding Faster: Getting More Productive with Microsoft Visual

Exercises for Delphi Advanced Programming Technology (English Version)

Cowley College & Area Vocational Technical School

Windows Presentation Foundation for.net Developers

M. K. Institute Of Computer Studies, Bharuch SYBCA SEM IV VB.NET (Question Bank)

C# Programming: From Problem Analysis to Program Design. Fourth Edition

Before You Begin. and Visual Basic 1

VB.NET Web : Phone : INTRODUCTION TO NET FRAME WORK

Getting started 7. Setting properties 23

Apex TG India Pvt. Ltd.

Lecture 5 COMMON CONTROLS

ASP.NET Web Forms Programming Using Visual Basic.NET

Index. AutoNumber data types, 154 6, 168 and Number data type, 181 AutoPostBack Property, 505, 511, 513 5, 527 8, AVG, 242, 247 8

DOT NET Syllabus (6 Months)

Overview Describe the structure of a Windows Forms application Introduce deployment over networks

10262A VB: Developing Windows Applications with Microsoft Visual Studio 2010

B. V. Patel Institute of Business Management, Computer & Information Technology, UTU

CSC 330 Object-Oriented

Getting started 7. Setting properties 23

Road Map for Essential Studio 2011 Volume 4

Chapter 10. Database Applications The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill

Beginning ASP.NET. 4.5 in C# Matthew MacDonald

Introduction to the Visual Studio.NET Integrated Development Environment IDE. CSC 211 Intermediate Programming

Developing Microsoft.NET Applications for Windows (Visual Basic.NET)

Developing Microsoft.NET Applications for Windows (Visual C#.NET)

Unit-1. Components of.net Framework. 1. Introduction to.net Framework

M. K. Institute Of Computer Studies, Bharuch SYBCA SEM IV VB.NET (Question Bank)

B.V Patel Institute of BMC & IT, UTU

Windows Programming Using C#

Quick Reference Card Business Objects Toolbar Design Mode

Tutorial 2 - Welcome Application Introducing, the Visual Studio.NET IDE

SQL Server 2005: Reporting Services

CST242 Windows Forms with C# Page 1

Introduction to Web Development with Microsoft Visual Studio 2010

INTRODUCTION TO.NET. Domain of.net D.N.A. Architecture One Tier Two Tier Three Tier N-Tier THE COMMON LANGUAGE RUNTIME (C.L.R.)

Pelnor Help Add-in.

Windows Presentation Foundation Programming Using C#

Team Developer 6.1. Configure the color-coding in the Tools Preferences dialog under the Outline tab.

This module reviews the core syntax and features of the C# programming language. It also provides an introduction to the Visual Studio 2012 debugger.

10267A CS: Developing Web Applications Using Microsoft Visual Studio 2010

ADO.NET 2.0. database programming with

How to use data sources with databases (part 1)

DE Introduction to Web Development with Microsoft Visual Studio 2010

Dot Net Framework 4.0: Advanced Microsoft C#.NET Web Development

Microsoft Official Courseware Course Introduction to Web Development with Microsoft Visual Studio

CHAPTER 1: INTRODUCTION TO THE IDE 3

- Release Notes - Version: Last Change: AIS Automation Dresden GmbH

COPYRIGHTED MATERIAL. Contents. Introduction. Chapter 1: Welcome to SQL Server Integration Services 1. Chapter 2: The SSIS Tools 21

.Net Interview Questions

Programming in C# Project 1:

Transcription:

Table of Contents INTRODUCTION...INTRO-1 Prerequisites...INTRO-2 Installing the Practice Files...INTRO-3 Software Requirements...INTRO-3 Sample Database...INTRO-3 Security...INTRO-4 Installation...INTRO-4 About the Authors...INTRO-5 INTRODUCTION TO WINDOWS FORMS...1-1.NET Does Windows...1-2 Adding Controls to a Form...1-6 Investigating Snap Lines...1-7 Adjusting Control Sizes and Positions...1-8 Controlling Tab Order...1-10 A Peek behind the Scenes...1-12 Viewing the Code...1-12 Adding Event Handling Code...1-18 Adding a Menu to the Form...1-20 Adding Non-Graphical Components...1-26 The ToolTip Component...1-26 The Timer Component...1-28 LAB 1: INTRODUCTION TO WINDOWS FORMS...1-35 Lab 1 Overview...1-36 Create a Windows Application...1-37 Anchor the Controls...1-41 Add Event-Handling Code...1-43 TAKING ADVANTAGE OF THE FORM EVENT MODEL...2-1 How Visual C# Handles Events...2-2 Working with Events...2-2 Working with Forms...2-7 Peeking under the Event Covers...2-13 Exploring Form and Control Events...2-27 TOC-1

Form Events...2-27 Keyboard Events...2-30 Mouse Events...2-37 Control Events...2-41 Validating User Input...2-41 LAB 2: TAKING ADVANTAGE OF THE FORM EVENT MODEL...2-51 Lab 2 Overview...2-52 Creating an Event Handler Using Visual Studio...2-53 Creating a Dynamic Event Handler...2-55 COMMON WINDOWS FORMS CONTROLS...3-1 Windows Forms Controls...3-2 Label Control...3-3 TextBox Control...3-8 Button Control...3-15 CheckBox Control...3-19 RadioButton Control...3-22 ComboBox Control...3-25 ListBox Control...3-29 CheckedListBox Control...3-31 LinkLabel Control...3-33 NumericUpDown Control...3-35 PictureBox Control...3-37 ProgressBar Control...3-39 LAB 3: COMMON WINDOWS FORMS CONTROLS...3-45 Lab 3 Overview...3-46 Create a Simple Data Entry Form...3-47 Modify the Data Entry Form...3-52 Add Validation to the Data Entry Form...3-56 EXCEPTION HANDLING...4-1 Perspectives on Exception Handling...4-2 Exception Handling in.net...4-2 The Demonstration Code...4-4 Getting Started with Exception Handling...4-5 No Error Handling...4-5 Adding a Simple Try/Catch Block...4-8 Unhandled Exceptions...4-10 Using an Exception Object...4-10 TOC-2

Catching Specific Exceptions...4-14 Taking Advantage of the Exception Hierarchy...4-17 Raising Errors...4-19 Using the Throw Keyword...4-19 Exception-Handling Options...4-20 Passing Error Information...4-21 Running Code Unconditionally...4-24 The Finally Block...4-24 Cleaning Up: The Using Statement...4-25 Handling Unhandled Exceptions...4-28 Creating Exception Classes...4-31 LAB 4: EXCEPTION HANDLING...4-39 Lab 4 Overview...4-40 Add Simple Exception Handling...4-42 Handle Individual Exceptions...4-44 Add Code Running Unconditionally...4-47 WORKING WITH STRINGS AND DATES...5-1 Basic.NET Data Types...5-2 Working with Text: The String Class...5-3 Investigating the String Class...5-3 Creating Strings...5-4 String Properties...5-5 Static String Methods...5-6 Instance String Methods...5-11 Manipulating Text with the StringBuilder Class...5-14 Working with Dates and Times...5-18 DateTime Constructors...5-18 Static Members...5-20 Simple Properties...5-21 Conversion Methods...5-22 Calculation Methods...5-23 Static Methods...5-24 Using the DateTime Type...5-25 Handling Elapsed Times with the TimeSpan Type...5-30 Measuring Elapsed Time...5-35 LAB 5: WORKING WITH STRINGS AND DATES...5-41 Lab 5 Overview...5-42 TOC-3

Work with Strings...5-43 Work with the StringBuilder Class...5-48 Use StopWatch and TimeSpan to Measure Elapsed Time...5-52 ACCESSING DATA...6-1 Overview of ADO.NET...6-2 ADO.NET Classes...6-2 The ADO.NET Architecture...6-3 Creating ADO.NET Data Objects...6-4 Connecting to Data...6-9 Setting Up Connection Information...6-9 Creating Connection Strings in the Configuration File...6-12 Using the Connection Object...6-14 Executing Commands...6-17 Working with Data Readers...6-17 Using the SQLDataReader...6-18 Working with Data...6-23 Working with Data Using a Data Adapter...6-23 Managing Data with the DataSet Object...6-23 Filling a DataTable within a DataSet...6-25 Filling a DataTable from SQL Server...6-28 Choosing an ADO.NET Provider...6-33 The SQL Server.NET Data Provider...6-33 The OLE DB.NET Data Provider...6-34 The ODBC Data Provider...6-34 Writing Code for Multiple Providers...6-35 LAB 6: ACCESSING DATA...6-45 Lab 6 Overview...6-46 Create a Connection String in the Configuration File...6-47 Use the DataReader to Fill a ListBox with Categories...6-49 Use a DataSet to Fill a DataGridView with Products...6-52 DATA BINDING TECHNIQUES...7-1 Data Binding Basics...7-2 Creating a Data Source...7-3 The Data Sources Window...7-7 Creating Data-Bound Forms...7-9 Data Binding Components and Controls...7-13 TOC-4

The DataSet...7-13 The TableAdapter...7-15 The BindingSource Component...7-17 The BindingNavigator Control...7-19 Displaying Data from Related Tables...7-21 Displaying Data from Lookup Tables...7-25 Adding Search Capabilities to a Form...7-28 Filtering by Values from a Lookup Table...7-35 Data Validation...7-40 Determining Whether the User Made Changes...7-40 Validating Data at the Form Level...7-43 Validating Data at the Data Level...7-45 Working with Local Data...7-50 LAB 7: DATA BINDING TECHNIQUES...7-57 Lab 7 Overview...7-58 Create a Simple Data-Bound Form...7-59 Search and Filter Based on Criteria...7-69 Validate Data...7-78 USING THE DATA CONTROLS...8-1 Data Controls...8-2 The BindingNavigator Control...8-3 BindingNavigator ToolStripItems...8-3 Built-In and Custom Functionality...8-5 Adding a BindingNavigator Control to a Form...8-6 The BindingSource Component...8-8 Data Navigation...8-8 Data Manipulation...8-10 Sorting and Filtering...8-11 Working with the Underlying Data...8-12 Working with Related Data...8-17 The DataGridView Control...8-21 Customizing How Data is Displayed...8-21 Formatting Cells at Runtime...8-26 Displaying Calculated Values...8-29 Displaying Images...8-30 Adding Controls to a DataGridView...8-33 The ReportViewer Control...8-36 TOC-5

Creating and Viewing Reports...8-36 Local and Remote Report Processing...8-41 LAB 8: USING THE DATA CONTROLS...8-45 Lab 8 Overview...8-46 Navigation and Data Manipulation with the BindingSource Component...8-47 Formatting the DataGridView Control...8-54 Displaying Reports with the ReportViewer Control...8-62 HANDLING INPUT/OUTPUT TASKS...9-1 Introducing the System.IO Namespace...9-2 Selecting Files...9-4 Browsing for Folders...9-13 Handling Path Information...9-17 Working with Directories and Files...9-21 Retrieving Information about Drives...9-23 Investigating the Objects...9-26 Calling Methods of the Directory Class...9-28 Filling the TreeView...9-31 Displaying Drive, File, and Directory Information...9-34 Using Stream-Based Objects to Read and Write File Contents...9-40 Reading and Writing Text Files...9-40 Investigating the Code...9-42 Alternate Solutions...9-46 Writing to Files Using the StreamWriter...9-47 LAB 9: HANDLING INPUT/OUTPUT TASKS...9-53 Lab 9 Overview...9-54 Browse for Files...9-55 Display Selected File Information...9-57 Load File Contents...9-59 PROJECT SETTINGS IN VISUAL STUDIO 2005...10-1 The Project Designer...10-2 Application Properties...10-3 Assembly Name...10-3 Root Namespace...10-4 Icon...10-4 Startup Object...10-4 TOC-6

Assembly Information...10-5 Compilation Properties...10-8 Conditional Compilation...10-9 Compiler Errors and Warnings...10-11 Build Events...10-12 Debugging Properties...10-14 Start Action...10-14 Start Options...10-15 Enable Debuggers...10-15 Project References...10-17 Adding Project References...10-17 Project Resources...10-22 Project Settings...10-26 LAB 10: PROJECT SETTINGS IN VISUAL STUDIO 2005...10-33 Lab 10 Overview...10-34 Application Behavior and Appearance...10-35 Building the Project...10-37 Project Resources and Settings...10-42 DEBUGGING YOUR APPLICATIONS...11-1 Debugging Applications...11-2 Setting Breakpoints and Stepping through Code...11-3 Setting a Breakpoint...11-3 Continuing Program Execution...11-5 Setting Conditional Breakpoints...11-5 Specifying a Breakpoint Hit Count...11-7 Setting a Breakpoint on a Function...11-7 Breakpoints Window...11-9 Breaking on Exceptions...11-9 Debugging Code in Assemblies...11-12 Stepping into Code in an Assembly...11-12 Stepping into Code Written in another Language...11-14 Evaluating Variables and Objects...11-15 DataTips and Visualizers...11-15 Using the Watch Window and QuickWatch Dialog Box...11-18 Using the Locals Window...11-20 Using the Autos Window...11-22 Using the Immediate Window...11-22 TOC-7

Edit and Continue...11-24 Tracing Applications...11-28 Trace Sources...11-28 Trace Switches...11-32 Trace Listeners...11-33 Trace Filtering...11-37 Using Configuration Files to Control Tracing...11-38 LAB 11: DEBUGGING YOUR APPLICATIONS...11-45 Lab 11 Overview...11-46 Setting Breakpoints and Stepping Through Code...11-47 Evaluating Expressions and Using Edit and Continue...11-52 Tracing Applications...11-60 CONTAINER CONTROLS...12-1 Introducing Container Controls...12-2 Working with Container Controls...12-3 Creating the Switchboard Form...12-3 Grouping Controls with the GroupBox Control...12-7 GroupBox Control Members...12-7 BackgroundImage and BackColor Properties...12-11 Visible, Enabled, and Font Properties...12-12 Introducing the Panel Control...12-14 BorderStyle Property...12-14 Scrolling Features...12-15 Displaying Multiple Panels with the SplitContainer Control...12-17 Orientation Property...12-18 IsSplitterFixed Property...12-19 SplitterWidth Property...12-19 SplitterDistance Property...12-19 FixedPanel Property...12-19 Panel1MinSize and Panel2MinSize Properties...12-20 Panel1Collapsed and Panel2Collapsed Properties...12-21 SplitContainer Control Events...12-21 Laying out Panels with the TabControl Control...12-24 Working with Tab Pages...12-26 Alignment Property...12-27 Appearance Property...12-27 MultiLine Property...12-28 SizeMode Property...12-29 TOC-8

ShowToolTips Property...12-31 Informational Properties...12-32 Adding Tab Pages...12-33 TabControl Events...12-33 Simple Layout Using the FlowLayoutPanel Control...12-35 Working with the FlowLayoutPanel Control...12-38 FlowLayoutPanel Control Properties...12-42 Advanced Layout Using the TableLayoutPanel Control...12-46 Getting Started with the TableLayoutPanel Control...12-46 Setting Row and Column Styles...12-48 Positioning New Controls...12-51 Adding Controls Programmatically...12-51 Working with Other Properties...12-53 Laying out the Columns or Rows...12-54 TableLayoutPanel Control Extender Properties...12-58 TableLayoutPanel Control Methods...12-60 LAB 12: CONTAINER CONTROLS...12-67 Lab 12 Overview...12-68 Lay Out a Panel Control...12-69 Use the SplitContainer Control...12-72 Work with the TableLayoutPanel Control...12-74 MENUS AND TOOLBARS...13-1 Introducing the 'Strips...13-2 Adding Menu Images...13-6 Using Visual Studio s Automatic Menus...13-8 The ToolStrip Control...13-9 The StatusStrip Control...13-12 The ContextMenuStrip Control...13-16 The ToolStripContainer Control...13-18 Working with a ToolStripItem...13-20 ToolStripItem Display Styles...13-22 Making and Saving Runtime Customizations...13-23 ToolStrip Layout Issues and Overflow...13-28 Working with the 'Strips...13-33 RichTextBox Demo...13-33 WebBrowser Demo...13-38 LAB 13: MENUS AND TOOLBARS...13-45 TOC-9

Lab 13 Overview...13-46 Add the MenuStrip...13-47 Add the ToolStrip...13-49 Add the StatusStrip...13-51 CREATING MDI APPLICATIONS...14-1 MDI Applications...14-2 Child Windows...14-3 Creating an MDI Application...14-3 MDI Parent and Child Forms...14-4 MDI Parent Form...14-4 MDI Child Forms...14-5 Managing Open Windows...14-8 Automatically Creating a Window List...14-8 Manually Creating a Window List...14-9 Arranging Open Windows...14-10 Managing Menus...14-14 Merging Menus...14-14 Design Considerations...14-18 Working with Open Forms...14-21 Handling the mdichildactivate Event...14-21 Handling Edit and Format Menu Items...14-22 Passing Data between Open Forms...14-24 Handling Form Closing...14-27 LAB 14: CREATING MDI APPLICATIONS...14-33 Lab 14 Overview...14-34 Create the Parent and Child Forms...14-35 Manage Menus and Open Windows...14-37 Work with Open Forms...14-46 COMPLEX WINDOWS FORMS CONTROLS...15-1 Introducing Complex Controls...15-2 NotifyIcon Control...15-3 Investigating the Sample Form...15-5 WebBrowser Control...15-11 Investigating the Sample Form...15-13 Investigating WebBrowser Navigation...15-14 Displaying Dialog Boxes...15-16 TOC-10

Reacting to Environment Changes...15-17 In Summary...15-22 MaskedTextBox Control...15-23 Operation of the MaskedTextBox Control...15-24 Reacting to the MaskInputRejected Event...15-29 Status Properties...15-30 In Summary...15-31 RichTextBox Control...15-32 Handling State...15-33 Undo and Redo...15-38 Working with the Clipboard...15-40 Working with Fonts and Styles...15-42 Formatting Text...15-47 Working with Zoom, Links, and More...15-51 TreeView and ListView Controls...15-53 TreeView Control...15-55 ListView Control...15-65 Setting Up the Images...15-68 Filling the List of Files...15-69 Working with ListView Items...15-72 Showing Items in Groups...15-74 Sorting the Columns...15-78 MonthCalendar and DateTimePicker Controls...15-86 The MonthCalendar Control...15-87 The DateTimePicker Control...15-94 In Summary...15-98 LAB 15: COMPLEX WINDOWS FORMS CONTROLS...15-103 Lab 15 Overview...15-104 Set Up the NotifyIcon Control...15-105 Add the DateTimePicker Control...15-108 Add a Web Browser...15-111 CREATING CUSTOM CONTROLS...16-1 Control Creation in Windows Forms...16-2 Inheriting from an Existing Control...16-3 Required Steps...16-3 Creating a TextBox with Required Input...16-4 Adding the Finishing Touches...16-9 Inheriting Controls, In Review...16-13 TOC-11

Drawing Your Own Custom Controls...16-14 Inheriting from the Control Base Class...16-14 Control Properties...16-16 Drawing the Control...16-17 Default Values and Serializing Properties...16-20 Raising Events...16-23 Hiding Properties...16-25 Adding Ease-of-Use Features...16-26 Drawing Your Own Controls, In Review...16-26 Creating Composite Controls...16-28 Required Steps...16-28 The Sample Control...16-29 Designer Support for Properties...16-31 Handling Events...16-32 Setting the Default Control Text...16-32 Serializing the Text Property...16-33 Data Binding...16-34 Inheriting from UserControl, In Review...16-36 LAB 16: CREATING CUSTOM CONTROLS...16-41 Lab 16 Overview...16-42 Create the DigitalClock Control...16-43 Add Finishing Touches...16-48 WORKING WITH TOOLBOX COMPONENTS...17-1 Introducing Components...17-3 Adding Components to Your Forms...17-5 Timer Component...17-8 Using the Timer Component...17-8 BackgroundWorker Component...17-12 Understanding the Code...17-13 Introducing Multi-Threading with the BackgroundWorker Component...17-17 FileSystemWatcher Component...17-23 Working with the FileSystemWatcher Component...17-24 PerformanceCounter Component...17-28 Retrieving Values Using the PerformanceCounter Component...17-30 Creating Performance Counters...17-33 Process Component...17-38 TOC-12

Using the Process Component...17-38 Process Component Methods...17-42 Start a Process and React When it s Completed...17-44 Working with Processes...17-46 ServiceController Component...17-48 Using the ServiceController Component...17-48 Interacting with Windows Services...17-51 Working with Services...17-53 EventLog Component...17-59 Event Log Concepts...17-59 Using the EventLog Component...17-61 Investigating the Sample Form...17-63 Working with the Server Explorer...17-72 LAB 17: WORKING WITH TOOLBOX COMPONENTS...17-79 Lab 17 Overview...17-80 Monitor File Changes Using the FileSystemWatcher Component...17-81 Keep Track of File Changes Using the EventLog Component...17-84 Run an Application Using the Process Component...17-87 INTEROPERABILITY...18-1 Interoperability...18-2 COM and.net...18-3 Understanding COM Components...18-3 Managed and Unmanaged Code...18-4 Calling COM Objects from.net...18-6 Calling a COM DLL from.net...18-6 Interop Assemblies...18-11 Exporting Data to Excel...18-12 Calling.NET Assemblies from COM...18-16 Creating COM DLLs in Visual Studio...18-16 Creating Wrappers for.net Framework Classes...18-21 Using Platform Invoke...18-26 Using the Windows API...18-26 Platform Invoke Caveats...18-29 Web Services...18-30 Web Service Requirements and Technologies...18-30 Creating a Web Service...18-32 Adding a Project Reference to a Web Service...18-36 TOC-13

Calling a Web Service...18-38 LAB 18: INTEROPERABILITY...18-43 Lab 18 Overview...18-44 Call a COM DLL from.net...18-45 Call a COM Object from.net...18-48 Call a.net Assembly from COM...18-52 DEPLOYING APPLICATIONS USING CLICKONCE...19-1 ClickOnce Deployment...19-2 Publishing an Application...19-3 Publishing an Application with the Publish Wizard...19-3 Publish, Install, and Update Locations...19-8 Setting Publish Options...19-10 Prerequisites...19-12 Additional Files...19-13 Updating a Deployed Application...19-15 Rolling Back an Update...19-16 Setting Update Options...19-17 What Happens when You Publish an Application?...19-20 Examining Publish.htm and Setup.exe...19-21 The Deployment Manifest...19-21 The Application Manifest...19-24 Application Files...19-26 The ClickOnce Cache...19-27 What Happens when You Publish an Update to an Application?...19-28 ClickOnce and Security...19-30 Setting Permissions...19-31 Debugging a Partial Trust Application...19-33 Changes to the Manifest Files...19-34 Using the Deployment API to Manage Updates...19-35 LAB 19: DEPLOYING APPLICATIONS USING CLICKONCE...19-41 Lab 19 Overview...19-42 Publish an Application...19-43 Update an Application...19-45 Debug with Reduced Permissions...19-50 INDEX...INDEX-1 TOC-14