Learn your way! Get started

Developing Applications Using Visual Basic 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

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


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’ll 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

Meet the experts

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 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 (22:38)
  • Introduction (02:24)
  • COM and .Net (01:39)
  • Managed/Unmanaged Code (00:23)
  • COM Interoperability (00:30)
  • Calling COM Objs from .NET (01:05)
  • Calling a COM DLL from .NET (00:41)
  • Demo: Calling a COM DLL (05:21)
  • Interop Assemblies (03:02)
  • Demo: Using Interop Assembly (06:31)
  • Summary (00:58)
Calling Dot NET from COM (12:28)
  • Introduction (00:34)
  • .Net Assemblies from COM (01:05)
  • Creating COM DLLs in VS (00:43)
  • Demo: .NET Code from COM (05:05)
  • Wrappers for .NET Classes (01:24)
  • Demo: Wrappers for .NET (03:10)
  • Summary (00:26)
PInvoke and Web Service (16:55)
  • Introduction (00:51)
  • Using Platform Invoke (01:09)
  • Demo: Calling Windows API (04:09)
  • Web Services (01:13)
  • Creating an XML Web Service (00:37)
  • Demo: Creating a Web Service (08:17)
  • Summary (00:34)

Module 2

Create WCF Service (41:43)
  • 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:02)
  • WCF Building Blocks (00:53)
  • Sevices (00:28)
  • Service Contracts (00:55)
  • Data Contracts (00:50)
  • Endpoints (01:46)
  • Bindings (01:15)
  • WCF Provided Bindings (02:01)
  • Demo: Products Service (24:25)
  • Summary (00:18)
Hosting a Web Service (26:56)
  • 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 (21:46)
  • Summary (00:19)

Module 3

Configuration (20:34)
  • Introduction (00:56)
  • ServiceModel Configuration (01:16)
  • services Element (00:38)
  • Configuration Example (00:37)
  • Multiple Endpoints (01:09)
  • Demo: Config WCF Services (15:24)
  • Summary (00:31)
Timer Background FSW (33:19)
  • 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:15)
  • BackgroundWker Component (00:47)
  • Demo: no BackgroundWker (01:07)
  • Demo: w/BackgroundWker (03:59)
  • Introducing Multi-Threading (00:40)
  • The Multi-Threading Rule (01:20)
  • BackgroundWorker Members (00:56)
  • Demo: Use BackgroundWker (09:28)
  • Sequence of Events (01:46)
  • FileSysWatcher Component (01:14)
  • Demo: FileSysWatcher (03:31)
  • Summary (01:38)

Module 4

Process Service Events (32:35)
  • Introduction (00:35)
  • Process Component (00:34)
  • Demo: Process Component (09:52)
  • ServiceController Component (00:34)
  • Demo: ServiceController (09:13)
  • EventLog Component (00:39)
  • Event Log Concepts (01:01)
  • Demo: EventLog Features (08:17)
  • Summary (01:45)
The Publish Wizard (11:51)
  • 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:09)
  • Summary (00:42)
Publish Options and Updating (29:07)
  • Introduction (00:34)
  • Setting Publish Options (01:31)
  • Updating an Application (01:10)
  • Demo: Updating (09:30)
  • When You Publish (02:10)
  • Deployment Manifest (01:03)
  • Application Manifest (00:34)
  • The ClickOnce Cache (01:17)
  • Demo: Manifest files (05:38)
  • Rolling Back (00:33)
  • Demo: Rolling Back (03:43)
  • Summary (01:18)

Module 5

VSTO and ClickOnce (18:58)
  • Introduction (02:18)
  • Deploying Office Solutions (02:14)
  • Office 2007 Solutions (00:33)
  • Demo: Using Clickonce (13:12)
  • Summary (00:39)
Serialization Intro (27:55)
  • 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:55)
  • .NET Formatter Classes (00:47)
  • A Simple Example (00:15)
  • Demo: Simple Example (06:26)
  • Generalizing the Serialization (00:42)
  • Demo: Generalizing (02:38)
  • Serializing Your Own Classes (00:19)
  • Making Classes Serializable (00:29)
  • Demo: Serializable Classes (05:00)
  • Serializing Customer (01:02)
  • Extra Info Serialized (01:02)
  • Summary (00:43)

Module 6

Complex Serialization (23:52)
  • 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:44)
  • Serialization to Clone Objects (01:24)
  • Using MemberwiseClone (00:41)
  • Demo: MemberwiseClone (01:08)
  • Shallow and Deep Copies (00:26)
  • Creating a Deep Clone (00:45)
  • Demo: Deep Clone (03:47)
  • Serializing Multiple Objects (00:44)
  • Demo: Multiple Objects (02:24)
  • Summary (00:46)
Customizing Serialization (12:58)
  • 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:20)
  • Summary (00:46)
Intro to Reporting (23:51)
  • Introduction (00:40)
  • Creating & Displaying Reports (01:35)
  • ReportViewer Control (01:12)
  • ReportViewer Toolbar (00:39)
  • Demo: Build a Report (09:11)
  • Page Headers and Footers (00:43)
  • Using Expressions (02:18)
  • Demo: Headers & Footers (07:05)
  • Summary (00:26)

Module 7

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

Module 8

Decisions and Hosting (31:54)
  • Introduction (00:45)
  • Using Rules in Workflows (00:52)
  • Using a RuleSet (01:10)
  • Using the Policy Activity (00:59)
  • Demo: RuleSet and Policy (14:07)
  • Workflow Architecture (01:33)
  • Hosting Workflow (00:43)
  • Passing Parameters (00:58)
  • Demo: Hosting Workflow (10:03)
  • Summary (00:39)
Communcation/State Machines (39:13)
  • Introduction (00:37)
  • Calling Host Methods (01:17)
  • Calling Methods in the Host (00:51)
  • Demo: Workflow Calls (16:16)
  • Handling Host Events (01:20)
  • State Machine Workflows (02:42)
  • State and SetState Activities (00:37)
  • Demo: State Machine (14:40)
  • Summary (00:49)

Module 9

WMI Intro (24:49)
  • 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 (04:17)
  • 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:44)
  • The ManagementClass Class (01:23)
  • Demo: ManagementClass (02:58)
  • Summary (01:05)
WMI Queries (29:25)
  • Introduction (00:53)
  • Queries, Properties, Methods (00:19)
  • WMI Query Language (01:03)
  • Demo: Example Query (09:46)
  • Modifying Object Properties (00:31)
  • Calling Object Methods (00:37)
  • Demo: Properties / Methods (06:12)
  • Asynchronous Calls (00:23)
  • Server Explorer Extensions (00:35)
  • Strongly Typed Wrapper Class (00:43)
  • Demo: Extensions (06:08)
  • Which Do You Choose? (01:08)
  • Summary (01:00)
WMI Events (14:10)
  • 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:36)
  • Summary (01:00)

Module 10

WMI Async (22:09)
  • Introduction (00:46)
  • WMI Asynchronously (00:43)
  • Demo: Sync / Async (05:35)
  • ManagementOpObserver (01:31)
  • Demo: Completed/ObjReady (06:07)
  • Strongly Typed Event Queries (00:49)
  • Demo: Event Queries (05:34)
  • Summary (01:01)
MDI Parent and Child Forms (16:18)
  • Introduction (01:17)
  • MDI Applications (00:43)
  • Child Windows (00:36)
  • 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:29)
  • Summary (00:24)
Managing Menus (11:53)
  • Introduction (00:41)
  • MDI Menus (00:47)
  • Two Approaches (01:12)
  • Merging Menus (01:08)
  • Demo: Two Approaches (06:47)
  • Summary (01:16)
Working with Open Forms (15:47)
  • 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:07)
  • Summary (00:49)

Module 11

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

Module 12

Controlling Appearance (39:00)
  • Introduction (01:20)
  • Working with Columns (00:50)
  • DataGridViewColumn (01:02)
  • Working with Rows (00:37)
  • DataGridViewRow Properties (01:13)
  • Working with Cells (00:41)
  • DataGridViewCell Properties (00:43)
  • DataGridView Properties (01:40)
  • Methods and Events (01:04)
  • Demo: DataGridView (11:28)
  • Formating and Styles (00:42)
  • Cell Style Properties (00:59)
  • Cell Templates (00:42)
  • Demo: Styles and Formats (15:17)
  • Summary (00:35)
Working with Data (42:32)
  • Introduction (01:13)
  • Populating Grids with Data (01:27)
  • Data Entry in Grids (01:59)
  • Demo: Data Grids (25:45)
  • Sorting in DataGridViews (01:53)
  • Demo: Methods for Sorting (09:34)
  • Summary (00:39)

Module 13

GDI Drawing (43:24)
  • 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" (11:41)
  • Owner-Drawn Controls (01:00)
  • DrawMode Property Values (01:04)
  • Demo: DrawMode Properties (07:29)
  • DrawItemEventArgs (01:07)
  • Different Item Heights (00:34)
  • Demo: Different Heights (03:32)
  • Creating Images on Menus (01:00)
  • Demo: Menu Images (05:13)
  • Summary (00:53)
Non-Rectangular Forms (27:10)
  • Introduction (00:39)
  • Non-Rectangular Forms (01:09)
  • Form"s Region Property (00:52)
  • Demo: GraphicsPath (05:48)
  • Setting TransparencyKey (00:54)
  • Demo: TransparencyKey (02:24)
  • Modifying Form"s UI (00:46)
  • WMP Skins (01:05)
  • Drawing Images (00:47)
  • Demo: Drawing Images (02:52)
  • Displaying Part of an Image (01:16)
  • Demo: Part of an Image (04:52)
  • Demo: Drag the Form (02:55)
  • Summary (00:44)

Module 14

VSTO Excel (37:00)
  • Introduction (01:31)
  • Office Projects in VS 2008 (01:45)
  • What Can You Do with Office? (00:44)
  • What Kinds of Applications? (01:04)
  • Doc vs. App Customizations (01:42)
  • Create an Excel Add-In (01:10)
  • Ribbon Customizations (01:32)
  • Demo: Excel Add-In (14:15)
  • Custom Task Pane (00:51)
  • In This Example (00:34)
  • Demo: Task Pane (09:35)
  • Summary (02:13)
VSTO Word (23:26)
  • Introduction (02:19)
  • Content Control Types (00:44)
  • Managed Wrappers (00:46)
  • Form using Content Controls (00:52)
  • Demo: Content Controls (11:33)
  • Demo: Data Binding (05:31)
  • 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:39)
  • Demo: Populate Message (03:43)
  • Summary (00:48)