Learn your way! Get started

Developing Applications Using C# 2008/2010: Vol 2

with experts Ken Getz, Robert Green


Course at a glance

Included in these subscriptions:

  • Dev & IT Pro Video
  • Dev & IT Pro Power Pack
  • Power Pack Plus

Release date Release date 7/20/2011
Level Level Intermediate
Runtime Runtime 15h 40m
Closed captioning Closed captioning N/A
Transcript Transcript N/A
eBooks / courseware eBooks / courseware Included
Hands-on labs Hands-on labs Included
Sample code Sample code Included
Exams Exams Included


Enterprise Solutions
Enterprise Solutions

Need reporting, custom learning tracks, or SCORM? Learn More



Course description

In this course you will learn about important development topics that are not normally covered in a beginning Windows application programming course. Starting with an introduction to .NET interoperability, you will work through crucial topics such as saving objects to a stream using .NET Serialization, creating and displaying reports, Windows Management Instrumentation (WMI), working with multiple-document interface (MDI) applications, and drawing your own user interfaces using the System.Drawing namespace. You will dig deeper into working with the most complex built-in controls, the DataGridView control, how to interact with printers and how to print documents. You will also investigate several new Visual Studio 2008 features, including Windows Communication Foundation (WCF), new deployment features using ClickOnce, Windows Workflow Foundation (WF), and new support for Office 2007 products using Visual Studio Tools for Office. You are certain to find many topics here that will extend your knowledge, your capabilities, and your value as a developer.

Learning Paths

This course will help you prepare for the following certification and exam:
MCTS: .NET Framework 4, Windows Applications
70-511: TS: Windows Applications Development with Microsoft .NET Framework 4

This course is part of the following LearnNowOnline SuccessPaths™:
Building Windows Applications

Meet the experts

Ken Getz Ken Getz is a featured instructor for several of our Visual Studio courses. He is a Visual Basic and Visual C# expert and has been recognized multiple times as a Microsoft MVP. Ken is a seasoned instructor, successful consultant, and the author or co-author of several best-selling books. He is a frequent speaker at technical conferences like Tech-Ed, VSLive, and DevConnections and he has written for several of the industry's most-respected publications including Visual Studio Magazine, CoDe Magazine, and MSDN Magazine.

Robert Green Robert Green is a Visual Studio expert and a featured instructor for several of our Visual Basic and Visual C# courses. He is currently a Technical Evangelist in the Developer Platform and Evangelism (DPE) group at Microsoft. He has also worked for Microsoft on the Developer Tools marketing team and as Community Lead on the Visual Basic team. Robert has several years of consulting experience focused on developer training and is a frequent speaker at technology conferences including TechEd, VSLive, VSConnections, and Advisor Live.


Course outline



Module 1

Calling COM from Dot NET (23:53)
  • Introduction (02:24)
  • COM and .Net (01:39)
  • Managed/Unmanaged Code (00:23)
  • COM Interoperability (00:30)
  • Calling COM Objs from .NET (01:06)
  • Calling a COM DLL from .NET (00:40)
  • Demo: Calling a COM DLL (04:52)
  • Interop Assemblies (03:01)
  • Demo: Using Interop Assembly (08:15)
  • Summary (00:58)
Calling Dot NET from COM (13:09)
  • Introduction (00:34)
  • .Net Assemblies from COM (01:05)
  • Creating COM DLLs in VS (00:43)
  • Demo: .NET Code from COM (05:58)
  • Wrappers for .NET Classes (01:23)
  • Demo: Wrappers for .NET (02:58)
  • Summary (00:26)
PInvoke and Web Service (16:54)
  • Introduction (00:51)
  • Using Platform Invoke (01:09)
  • Demo: Calling Windows API (04:23)
  • Web Services (01:14)
  • Creating an XML Web Service (00:34)
  • Demo: Creating a Web Service (08:05)
  • Summary (00:34)

Module 2

Create WCF Service (39:16)
  • Introduction (00:56)
  • Windows Comm. Foundation (01:25)
  • WCF to the Rescue (00:47)
  • WCF and Web Services (00:46)
  • WCF and .NET Remoting (00:48)
  • Demo: Hello World (04:43)
  • WCF Building Blocks (00:53)
  • Sevices (00:29)
  • Service Contracts (00:55)
  • Data Contracts (00:51)
  • Endpoints (01:46)
  • Bindings (01:15)
  • WCF Provided Bindings (02:00)
  • Demo: Products Service (21:17)
  • Summary (00:18)
Hosting a Web Service (27:24)
  • Introduction (00:30)
  • Hosting a WCF Service (00:38)
  • Hosting Options (00:54)
  • Hosting in IIS (00:48)
  • In Client Applictations (01:00)
  • Channels (00:58)
  • Demo: Hosting a Service (22:14)
  • Summary (00:19)

Module 3

Configuration (22:46)
  • Introduction (00:56)
  • ServiceModel Configuration (01:16)
  • services Element (00:38)
  • Configuration Example (00:37)
  • Multiple Endpoints (01:09)
  • Demo: Config WCF Services (17:35)
  • Summary (00:31)
Timer Background FSW (35:26)
  • Introduction (00:49)
  • Introducing Components (01:43)
  • Add Components to Your Form (00:40)
  • Timer Component (00:38)
  • Demo: Use Timer Component (01:41)
  • Timer Limitations (01:14)
  • BackgroundWker Component (00:48)
  • Demo: no BackgroundWker (01:07)
  • Demo: w/BackgroundWker (04:15)
  • Introducing Multi-Threading (00:40)
  • The Multi-Threading Rule (01:25)
  • BackgroundWker Members (00:52)
  • Demo: Use BackgroundWker (11:23)
  • Sequence of Events (01:46)
  • FileSysWatcher Component (01:13)
  • Demo: FileSysWatcher (03:28)
  • Summary (01:38)

Module 4

Process Service Events (32:39)
  • Introduction (00:35)
  • Process Component (00:34)
  • Demo: Process Component (09:49)
  • ServiceController Component (00:31)
  • Demo: ServiceController (09:02)
  • EventLog Component (00:41)
  • Event Log Concepts (00:59)
  • Demo: EventLog Features (08:39)
  • Summary (01:45)
The Publish Wizard (11:59)
  • Introduction (01:27)
  • Publishing an Application (01:26)
  • Using the Publish Wizard (00:26)
  • Installing the Application (00:41)
  • Publish & Install Locations (00:26)
  • Update Locations (00:31)
  • Demo: Publish with ClickOnce (06:17)
  • Summary (00:42)
Publish Options and Updating (28:22)
  • Introduction (00:34)
  • Setting Publish Options (01:31)
  • Updating an Application (01:10)
  • Demo: Updating (10:01)
  • When You Publish (02:10)
  • Deployment Manifest (01:04)
  • Application Manifest (00:34)
  • The ClickOnce Cache (01:17)
  • Demo: Manifest files (08:39)
  • Summary (01:18)

Module 5

VSTO and ClickOnce (20:12)
  • Introduction (02:18)
  • Deploying Office Solutions (02:14)
  • Office 2007 Solutions (00:33)
  • Demo: Using Clickonce (14:26)
  • Summary (00:39)
Serialization Intro (25:49)
  • Introduction (00:45)
  • Serialization/Deserialization (01:03)
  • What"s Up? (00:48)
  • Using Serialization (01:50)
  • Serialization vs. Persistence (01:33)
  • .NET and Serialization (00:26)
  • Formatter Objects (01:03)
  • Using Formatter Objects (00:54)
  • .NET Formatter Classes (00:47)
  • A Simple Example (00:15)
  • Demo: Simple Example (04:58)
  • Generalizing the Serialization (00:42)
  • Demo: Generalizing (02:32)
  • Serializing Your Own Classes (00:19)
  • Making Classes Serializable (00:29)
  • Demo: Serializable Classes (04:28)
  • Serializing Customer (01:02)
  • Extra Info Serialized (01:01)
  • Summary (00:43)

Module 6

Complex Serialization (24:28)
  • Introduction (00:52)
  • Serializing Complex Objects (00:17)
  • Sample Object Graph (02:10)
  • Investigating the Sample (01:10)
  • Filling the Sample Hierarchy (01:28)
  • Demo: Serialize Object Graph (05:40)
  • Serialization to Clone Objects (01:23)
  • Using MemberwiseClone (00:42)
  • Demo: MemberwiseClone (01:02)
  • Shallow and Deep Copies (00:25)
  • Creating a Deep Clone (00:46)
  • Demo: Deep Clone (04:53)
  • Serializing Multiple Objects (00:44)
  • Demo: Multiple Objects (02:03)
  • Summary (00:46)
Customizing Serialization (13:04)
  • Introduction (00:48)
  • Overview (00:28)
  • Investigating the Sample (00:36)
  • Running the Demonstration (00:22)
  • Demo: Default Serialization (01:22)
  • Stored Efficiently? (00:22)
  • Custom Serialization (00:29)
  • SerializationInfo Object (00:50)
  • Serializing to a BitArray (00:47)
  • Custom Constructor (00:42)
  • Demo: Custom Serialization (05:27)
  • Summary (00:46)
Intro to Reporting (24:59)
  • Introduction (00:40)
  • Creating & Displaying Reports (01:35)
  • ReportViewer Control (01:12)
  • ReportViewer Toolbar (00:39)
  • Demo: Build a Report (07:53)
  • Page Headers and Footers (00:42)
  • Using Expressions (02:17)
  • Demo: Headers & Footers (09:31)
  • Summary (00:26)

Module 7

Grouping and Filtering (20:30)
  • Introduction (01:04)
  • Grouping & Sorting Reports (01:17)
  • Demo: Adding Groups (05:17)
  • Filtering Data at Runtime (01:59)
  • Report Parameters & Filters (00:53)
  • Set Report Parameter (00:34)
  • Demo: Filter Data (08:18)
  • Summary (01:06)
One to Many Relationships (12:59)
  • Introduction (00:40)
  • In Reports (00:34)
  • Subreports (01:37)
  • Demo: Subreport (04:52)
  • Drillthrough Reports (01:30)
  • Demo: Drillthrough (03:14)
  • Summary (00:29)
Work Flow Intro (33:39)
  • Introduction (00:48)
  • Window Workflow Foundation (00:49)
  • Rethinking Applications (00:41)
  • Wouldn"t It Be Great If... (00:11)
  • You"re In Luck! (01:08)
  • Demo: Workflow (06:24)
  • Activities (01:13)
  • Conditional Activities (01:06)
  • IfElse Activity (01:06)
  • While Activity (00:47)
  • Demo: IfElse Activity (10:00)
  • Demo: While Activity (08:50)
  • Summary (00:31)

Module 8

Decisions and Hosting (30:04)
  • Introduction (00:45)
  • Using Rules in Workflows (00:51)
  • Using a RuleSet (01:11)
  • Using the Policy Activity (01:00)
  • Demo: RuleSet and Policy (11:16)
  • Workflow Architecture (01:32)
  • Hosting Workflow (00:43)
  • Passing Parameters (00:59)
  • Demo: Hosting Workflow (11:04)
  • Summary (00:39)
Communcation/State Machines (38:21)
  • Introduction (00:37)
  • Calling Host Methods (01:17)
  • Calling Methods in the Host (00:51)
  • Demo: Workflow Calls (13:25)
  • Handling Host Events (00:45)
  • Event Arguments (00:34)
  • State Machine Workflows (02:43)
  • State and SetState Activities (00:38)
  • Demo: State Machine (16:39)
  • Summary (00:49)

Module 9

WMI Intro (25:27)
  • Introduction (01:14)
  • Introducing WMI (00:35)
  • WMI to the Rescue (00:23)
  • Determine Free Space? (01:12)
  • What"s It Doing? (00:35)
  • Demo: WMI (03:48)
  • WMI Properties (00:37)
  • WMI Background (01:08)
  • WMI Documentation (01:14)
  • Demo: Documentation (02:50)
  • Getting Started with WMI (01:28)
  • Demo: ManagementScope (03:56)
  • The ManagementClass Class (01:23)
  • Demo: ManagementClass (03:53)
  • Summary (01:05)
WMI Queries (29:12)
  • Introduction (00:53)
  • Queries, Properties, Methods (00:19)
  • WMI Query Language (01:03)
  • Demo: Example Query (08:21)
  • Modifying Object Properties (00:28)
  • Calling Object Methods (00:41)
  • Demo: Properties / Methods (07:09)
  • Asynchronous Calls (00:27)
  • Server Explorer Extensions (00:32)
  • Strongly Typed Wrapper Class (00:47)
  • Demo: Extensions (06:18)
  • Which Do You Choose? (01:09)
  • Summary (01:00)
WMI Events (13:59)
  • Introduction (00:56)
  • WMI Event Handlers (00:35)
  • Demo: Event Handlers (02:07)
  • WqlEventQuery Class (00:42)
  • Event Query Syntax (01:52)
  • Using WqlEventQuery (00:41)
  • ManagementEventWatcher (00:57)
  • Clean Up Event Handler (00:13)
  • Creation / Deletion Events (00:26)
  • Demo: Creation / Deletion (04:25)
  • Summary (01:00)

Module 10

WMI Async (22:56)
  • Introduction (00:46)
  • WMI Asynchronously (00:43)
  • Demo: Sync / Async (05:52)
  • ManagementOpObserver (01:31)
  • Demo: Completed/ObjReady (05:43)
  • Strongly Typed Event Queries (00:49)
  • Demo: Event Queries (06:28)
  • Summary (01:01)
MDI Parent and Child Forms (15:58)
  • Introduction (01:17)
  • MDI Applications (01:20)
  • Creating an MDI Application (00:33)
  • MDI Parent Form (00:35)
  • MDI Child Forms (00:43)
  • Managing Open Windows (01:15)
  • Arranging Windows (00:37)
  • Demo: Parent & Child Forms (09:10)
  • Summary (00:24)
Managing Menus (12:57)
  • Introduction (00:41)
  • MDI Menus (00:47)
  • Two Approaches (01:12)
  • Merging Menus (01:04)
  • Demo: Two Approaches (07:55)
  • Summary (01:16)
Working with Open Forms (15:46)
  • Introduction (00:47)
  • Open Forms (00:41)
  • MdiChildActivate Event (00:48)
  • Working with Text (00:50)
  • Passing Data (00:52)
  • Handling Form Closing (00:51)
  • Demo: Open Forms (10:05)
  • Summary (00:49)

Module 11

Printing Classes (44:32)
  • Introduction (00:59)
  • A Simple Report (00:37)
  • PrintDocument Class (01:13)
  • PagePrint Event Handler (01:42)
  • Demo: Simple Report (09:48)
  • Tabular Report (00:49)
  • Demo: Tabular Report (10:25)
  • PageSettings Class (01:18)
  • Demo: PageSettings (04:38)
  • Enumerated Properties (01:12)
  • PrinterSettings Class (00:37)
  • Working with Printers (00:20)
  • Listing Printers (00:13)
  • Default Printer (00:41)
  • Selecting a Printer (00:16)
  • Simple Properties (00:44)
  • Paper Sizes (00:32)
  • Paper Sources (00:28)
  • Printer Resolutions (01:45)
  • Demo: PrinterSettings (00:46)
  • Demo: Installed Printers (04:46)
  • Summary (00:32)
Print Controls (38:25)
  • Introduction (00:34)
  • Print-Related Controls (01:06)
  • PageSetupDialog Control (01:19)
  • PrintDialog Class (02:59)
  • PrintPreviewDialog Control (01:46)
  • Demo: Printing Controls (08:13)
  • Demo: Complex Report (01:41)
  • A More Complex Report (02:04)
  • Page Dimensions (00:16)
  • PrintPageEventArgs Values (01:01)
  • PrintPageEventArgs Properties (00:42)
  • Hard Margins (01:36)
  • Demo: Hard Margins (14:11)
  • Summary (00:53)

Module 12

Controlling Appearance (38:45)
  • Introduction (01:20)
  • Working with Columns (00:50)
  • DataGridViewColumn (01:02)
  • Working with Rows (00:37)
  • DataGridViewRow Properties (01:13)
  • Working with Cells (00:42)
  • DataGridViewCell Properties (00:43)
  • DataGridView Properties (01:40)
  • Methods and Events (01:04)
  • Demo: DataGridView (12:01)
  • Formating and Styles (00:42)
  • Cell Style Properties (00:59)
  • Cell Templates (00:42)
  • Demo: Styles and Formats (14:31)
  • Summary (00:35)
Working with Data (38:34)
  • Introduction (01:13)
  • Populating Grids with Data (01:27)
  • Data Entry in Grids (01:59)
  • Demo: Data Grids (23:08)
  • Sorting in DataGridViews (01:46)
  • Demo: Methods for Sorting (08:18)
  • Summary (00:39)

Module 13

GDI Drawing (44:14)
  • Introduction (00:50)
  • Intoducing Drawing (01:47)
  • Demo: Painting on a Form (02:33)
  • Learn to Paint (01:37)
  • Graphics Class (00:46)
  • Getting a Graphics Object (01:24)
  • Graphics Class Members (00:47)
  • Demo: Draw "Hello World" (13:24)
  • Owner-Drawn Controls (01:01)
  • DrawMode Property Values (01:05)
  • Demo: DrawMode Properties (06:21)
  • DrawItemEventArgs (01:06)
  • Different Item Heights (00:35)
  • Demo: Different Heights (03:45)
  • Creating Images on Menus (01:01)
  • Demo: Menu Images (05:13)
  • Summary (00:53)
Non Rectangular Forms (24:50)
  • Introduction (00:39)
  • Non-Rectangular Forms (01:10)
  • Form"s Region Property (00:51)
  • Demo: GraphicsPath (04:24)
  • Setting TransparencyKey (00:54)
  • Demo: TransparencyKey (02:08)
  • Modifying Form"s UI (00:47)
  • WMP Skins (01:04)
  • Drawing Images (00:48)
  • Demo: Drawing Images (02:35)
  • Displaying Part of an Image (01:16)
  • Demo: Part of an Image (04:56)
  • Demo: Drag the Form (02:28)
  • Summary (00:44)

Module 14

VSTO Excel (39:12)
  • Introduction (01:31)
  • Office Projects in VS 2008 (01:45)
  • What Can You Do with Office? (00:45)
  • What Kinds of Applications? (01:07)
  • Doc vs. App Customizations (01:43)
  • Create an Excel Add-In (01:08)
  • Ribbon Customizations (01:33)
  • Demo: Excel Add-In (16:28)
  • Custom Task Pane (00:50)
  • In This Example (00:35)
  • Demo: Task Pane (09:30)
  • Summary (02:13)
VSTO Word (25:29)
  • Introduction (02:17)
  • Content Control Types (00:44)
  • Managed Wrappers (00:46)
  • Form using Content Controls (00:52)
  • Demo: Content Controls (12:49)
  • Demo: Data Binding (06:20)
  • Summary (01:39)
VSTO Outlook (14:27)
  • Introduction (01:28)
  • Outlook Form Regions (00:15)
  • Types of Form Regions (01:32)
  • Demo: Outlook Add-In (06:54)
  • Demo: Populate Message (03:28)
  • Summary (00:47)