Learn your way! Get started

Developing Apps Using Visual C# 2005: Additional Topics

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 11/27/2006
Level Level Intermediate
Runtime Runtime 17h 58m
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
Platform Platform Internet Explorer Only


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 saving objects to a stream using .NET Serialization and creating and displaying reports, you will work through crucial topics such as attributes and reflection, programming XML using the XmlDocument class, and the XmlReader/XmlWriter classes, creating Windows Services, and drawing your own user interfaces using the System.Drawing namespace. You will see how to handle vital distribution issues, learning about application security, versioning, and deployment. You will dig deeper into working with the most complex of the built-in controls of Visual Studio, the DataGridView control, how to extend Visual Studio 2005 in a number of different ways, get started building mobile applications, and how to interact with printers and how to print documents. You are certain to find many topics here that will extend your knowledge, your capabilities, and your value as a developer.

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

Serialization (49:15)
  • Introduction (02:46)
  • Intro to Serialization (02:12)
  • Client-Side Serialization (00:52)
  • Using Serialization (01:40)
  • Serialization vs. Persistence (01:04)
  • .NET and Serialization (00:27)
  • Intro to Formatter Objects (01:39)
  • Using Formatter Objects (01:28)
  • Simple Serialization Example (05:36)
  • Deserialization Example (02:08)
  • Generalizing the Serialization (03:58)
  • Serializing Your Own Objects (04:08)
  • Serializing Customer (01:06)
  • Serialized Information (01:13)
  • Serializing Complex Objects (06:27)
  • Creating Survey Object Graph (05:58)
  • Serialize Object Graph (02:57)
  • Deserialize Object Graph (01:40)
  • Summary (01:48)
Extending Serialization (29:57)
  • Introduction (01:01)
  • Intro to Cloning Objects (01:54)
  • Survey Class Clone (00:39)
  • Shallow vs. Deep Copies (00:38)
  • Create a Shallow Clone (02:51)
  • Create a Deep Clone (02:21)
  • Serializing Multiple Objects (02:47)
  • Customizing Serialization (05:42)
  • SerializationInfo Object (01:35)
  • Serializing to a BitArray (00:51)
  • Custom Constructor (01:05)
  • Custom Serialization (06:27)
  • Summary (02:00)

Module 2

Create / Display Reports (29:39)
  • Introduction (01:26)
  • VS 2005 Report Designer (00:44)
  • Create / Display Reports (01:09)
  • ReportViewer Control (02:04)
  • ReportViewer Toolbar (00:34)
  • Create a Basic Report (05:57)
  • Display a Basic Report (02:00)
  • View Code Behind Form (00:49)
  • Page Headers / Footers (00:59)
  • Format Numbers / Dates (00:36)
  • Use Expressions (02:28)
  • Add Header / Footer (02:54)
  • Format Unit Price (01:05)
  • Add Expressions to Report (00:29)
  • Edit Expression Dialog (02:38)
  • Conditional Formatting (03:10)
  • Summary (00:28)
Group / Filter Reports (24:16)
  • Introduction (00:50)
  • Overview (01:37)
  • Create a Group (01:52)
  • Sort the Group (04:34)
  • Filter Data at Runtime (02:07)
  • Create Report Parameter (00:26)
  • Create Report Filter (00:26)
  • Set Parameter at Runtime (00:32)
  • Filter with Queries (03:38)
  • Filter w/Report Parameters (05:44)
  • Summary (02:25)
One To Many Relationships (17:33)
  • Introduction (00:57)
  • Overview (01:00)
  • Subreports (01:26)
  • Create a Subreport (06:46)
  • Drillthrough Reports (01:29)
  • Create a Drillthrough Report (05:19)
  • Summary (00:34)

Module 3

Introducing WMI (49:51)
  • Introduction (01:16)
  • Overview of WMI (01:26)
  • Determine Free Space (05:38)
  • What WMI Explorer Is Doing (00:56)
  • WMI Properties (01:31)
  • WMI Documentation (04:01)
  • Getting Started with WMI (01:28)
  • ManagementObject (04:11)
  • WMI and Scope (04:54)
  • ManagementClass Class (04:49)
  • Retrieving All Instances (01:55)
  • WMI Review (01:29)
  • Queries, Properties, Methods (00:53)
  • ManagementObjectSearcher (00:23)
  • SelectQuery Class (08:25)
  • WMI Query Language (WQL) (05:30)
  • Summary (00:58)
Modify WMI Objects (25:30)
  • Introduction (01:11)
  • Modifying WMI Object Property (02:30)
  • Calling WMI Object Methods (01:44)
  • Call WMI Object Method (05:59)
  • WMI Server Explorer Ext. (03:54)
  • Strongly Typed Wrapper Class (01:22)
  • Manage Classes in the UI (00:54)
  • Generate Managed Classes (01:38)
  • Server Extensions (01:24)
  • OS Serial Number (02:35)
  • Extensions vs. Own Classes (00:43)
  • Summary (01:32)
WMI Events (23:16)
  • Introduction (01:14)
  • WMI Event Handlers (02:50)
  • WqlEventQuery Class (02:44)
  • Using WqlEventQuery (00:35)
  • ManagementEventWatcher (01:39)
  • Clean Up the Event Handler (00:48)
  • ServiceWatcher (04:30)
  • Tracking Processes (02:45)
  • Background Threads & Forms (04:39)
  • Summary (01:29)

Module 4

WMI Async (26:38)
  • Introduction (01:51)
  • WMI Async. Events (02:26)
  • MgmtOperationObserver (02:20)
  • WMI Synchronous Event (03:14)
  • WMI Dates and Times (01:50)
  • EventLogAsyncForm (03:29)
  • Event Hooks (04:07)
  • Strongly Typed Event Queries (06:04)
  • Summary (01:12)
Control Appearance (44:11)
  • Introduction (01:28)
  • Work with Columns (00:43)
  • DataGridViewColumn Props (01:38)
  • Work with Rows (00:51)
  • DataGridViewRow Props (01:12)
  • DataGridViewBand Class (00:30)
  • Working with Cells (00:47)
  • DataGridViewCell Props (01:08)
  • Formatting and Styles (00:56)
  • DataGridViewCellStyle Props (01:28)
  • Cell Templates (00:45)
  • Demo: Work with Columns (07:35)
  • Demo: Styles / Formats (06:11)
  • Demo: DefaultCellStyle (02:44)
  • Demo: CellStyle (02:25)
  • Populate Unbound Columns (08:40)
  • Use Custom Cell Templates (04:22)
  • Summary (00:39)
Work with Data (31:21)
  • Introduction (01:19)
  • Populating Grids with Code (01:34)
  • Data Entry in Grids (02:31)
  • Sort in DataGridViews (01:23)
  • Populate Grid from Array (03:25)
  • Data Entry Form (02:38)
  • CellValidating Event (04:19)
  • DataGridView Events (04:27)
  • Display Objects in Grid (02:48)
  • Sort in Code (01:01)
  • Sort Method (00:43)
  • IComparer Interface (02:34)
  • SortCompare Event (01:48)
  • Summary (00:43)

Module 5

Item Templates (25:47)
  • Introduction (01:35)
  • Create Item Templates (02:06)
  • Demo: Create Item Template (01:54)
  • Export Template Wizard (02:39)
  • Create Based on a Template (01:32)
  • Demo: Modify a Template (02:43)
  • Manage Item Templates (02:33)
  • Item Template Contents (00:59)
  • Modify the Template (01:12)
  • Demo: Manage Templates (00:38)
  • Demo: VS 2005 Templates (01:28)
  • Change Template Location (01:04)
  • Demo: Template Contents (04:50)
  • Summary (00:29)
Project Templates (19:00)
  • Introduction (01:04)
  • Create Project Templates (01:10)
  • Demo: Create Proj. Template (02:09)
  • Export Template Wizard (00:33)
  • Create Based on Template (00:47)
  • Manage Project Templates (01:16)
  • Project Template Contents (00:50)
  • Organize Project Templates (01:08)
  • Template Location (02:01)
  • Change Template Location (00:19)
  • Template Contents (00:47)
  • Modify the Template XML (03:00)
  • Organize Templates (03:00)
  • Summary (00:48)
Code Snippets (20:14)
  • Introduction (01:11)
  • Overview (00:40)
  • Snippet Categories (01:57)
  • Use Snippets (00:37)
  • Manage Snippets (01:11)
  • Demo: Use Snippets (01:27)
  • Snippet Locations (00:39)
  • View Snippet in Notepad (00:12)
  • Additional Snippets (00:22)
  • Code Snippet Manager (01:10)
  • Add an Array Snippet (01:03)
  • Create/Modify Snippets (01:08)
  • VS Code Snippet Editor (05:49)
  • Save New Snippet (00:27)
  • Insert New Snippet in VS (00:14)
  • Edit the Snippet (01:09)
  • Summary (00:50)
Macros (18:48)
  • Introduction (01:15)
  • Use Macros to Automate IDE (00:38)
  • Record Macro (00:17)
  • Run a Macro (00:19)
  • Visual Studio Macros (00:25)
  • Demo: Record/Run a Macro (02:42)
  • Examine the Macro Code (01:58)
  • Automation Object Model (00:40)
  • Properties in DTE Interface (00:38)
  • TextSelection Interface (00:48)
  • Save Macros (00:30)
  • Macro Projects (00:51)
  • Demo: Save Macro Projects (01:15)
  • Demo: Create a Macro Project (00:43)
  • Macro Location (00:39)
  • Demo: Load a Macro Project (00:34)
  • Copyright Macro (00:48)
  • CopyCodeToTextFile Macro (01:39)
  • GoogleSearch Macro (01:13)
  • Summary (00:48)

Module 6

Introducing Drawing (46:11)
  • Introduction (01:19)
  • Drawing Namespaces (01:06)
  • Drawing on Forms (02:25)
  • Form Painting Basics (01:48)
  • Graphics Class (04:30)
  • Resize Ellipse on a Form (07:00)
  • Drawing Text on a Form (07:11)
  • Dispose or Not Dispose (01:27)
  • More Form Drawing (06:39)
  • Owner-Drawn Controls (02:49)
  • Owner Draw Fixed (05:52)
  • Owner Draw Variable (02:32)
  • Summary (01:25)
Non-Rectangular Forms (36:26)
  • Introduction (01:18)
  • Creating Images on Menus (01:33)
  • TransparencyKey (01:01)
  • Transparency Form (01:25)
  • Hooking Up Menu Items (04:01)
  • Non-Rectangular Forms (01:30)
  • Set Region Property (05:52)
  • Set TransparencyKey (04:10)
  • Dynamically Modify UI (01:50)
  • Drawing Images on Buttons (04:28)
  • Displaying Part of an Image (03:37)
  • Drawing Text on an Image (01:35)
  • Moving the Form (01:53)
  • Summary (02:08)
DataGridView Column (15:55)
  • Introduction (02:18)
  • Custom DataGridView Column (00:27)
  • Create a New Column Type (01:11)
  • DataGridView Column (01:32)
  • DataGridViewBarGraphCell (05:21)
  • DataGridViewBarGraphColumn (02:30)
  • Change BarGraph Column (01:22)
  • Summary (01:10)

Module 7

Private Assemblies (27:23)
  • Introduction (01:38)
  • Overview (01:08)
  • Version Numbers (01:49)
  • How CLR Locates Assemblies (02:14)
  • Private Assemblies (01:58)
  • Deploy a Private Assembly (01:39)
  • ILDASM.exe (03:12)
  • Create a New Version (04:04)
  • Using Config Files (01:29)
  • Move the Assembly (00:55)
  • Create an App Config File (01:26)
  • Framework 2.0 Config Tool (02:59)
  • View the New Config File (01:56)
  • Summary (00:51)
Strong Naming (17:43)
  • Introduction (01:17)
  • Overview (01:37)
  • Create a Strong Name (01:03)
  • Bind App. to Strong Name (01:28)
  • Enforce Versioning (00:19)
  • Modify Config File (00:08)
  • View the Manifest (02:57)
  • Overwrite Version (01:08)
  • Redirecting (01:26)
  • Add Functionality (01:46)
  • Deploy New App (01:01)
  • Binding Policy / Codebases (01:22)
  • bindingRedirect Element (00:57)
  • Summary (01:07)
Shared Assemblies (13:28)
  • Introduction (01:47)
  • Overview (01:38)
  • Global Assembly Cache (GAC) (00:58)
  • Ref. to Shared Assemblies (01:02)
  • Install Assembly into GAC (02:24)
  • Add New Reference (00:39)
  • Add to Add Reference List (02:32)
  • Use Shared Assemblies (01:18)
  • Summary (01:06)
Creating Windows Services (31:44)
  • Introduction (01:06)
  • Introducing Windows Services (02:53)
  • Windows Services and .NET (02:01)
  • Steps for Building Services (00:38)
  • Building a Service (03:21)
  • Adding an Installer (01:25)
  • Using Command Line Install (02:22)
  • Modify / Uninstall a Service (00:29)
  • FileWatcher Service (03:53)
  • Demo: FileWatcher Service (06:22)
  • Debugging FileWatcher (05:04)
  • Summary (02:06)

Module 8

Device Development (36:03)
  • Introduction (00:41)
  • .NET Compact Framework (02:21)
  • Supported Devices (02:06)
  • VS Device Development (00:52)
  • Device Emulators (01:27)
  • Build a Pocket PC App. (03:09)
  • Test Pocket PC App. (01:42)
  • Examine the Emulator (01:12)
  • Expand Pocket PC App. (01:39)
  • Build a Smartphone App. (02:25)
  • Test Smartphone PC App. (02:37)
  • Device Controls (00:52)
  • Design Guidelines (01:59)
  • Compact Framework Classes (02:15)
  • Connect to Emulators (01:49)
  • Use Screen Orientation (01:24)
  • Work with Status Namespace (03:19)
  • Change Target Platform (03:16)
  • Summary (00:49)
Mobile Database Apps (18:36)
  • Introduction (01:06)
  • Overview (02:24)
  • Create a Database (02:12)
  • Create New Database App. (01:34)
  • Add/Edit DataGrid (01:41)
  • Generate Data Forms (00:55)
  • Test Database App. (01:19)
  • Modify Database App. (02:03)
  • Test Changes in App. (02:19)
  • Create Additional Queries (01:42)
  • Summary (01:16)

Module 9

Overview: Read XML (47:54)
  • Introduction (01:16)
  • Get Started with XML (00:22)
  • XML Doc. Object Model (01:09)
  • Tree-Based XML Handling (03:46)
  • Non-Cached XML Handling (00:32)
  • XML DOM Explained (00:43)
  • Examine a Simple XML File (03:49)
  • Load XML Data (02:30)
  • Work with Nodes (07:33)
  • Retrieve Element Names (01:54)
  • Retrieve Text Nodes (01:47)
  • Retrieve Select Nodes (00:44)
  • Overview: XPath (01:30)
  • Select for Nodes (04:17)
  • Work with Namespaces (04:13)
  • Create Namespace Manager (02:24)
  • Work with Specific Node (00:34)
  • Work with Related Nodes (01:42)
  • Retrieve a Specific Node (01:15)
  • Retrieve Related Nodes (01:20)
  • Work with Node Attributes (00:57)
  • Retrieve Node Attributes (00:53)
  • Retrieve Single Attribute (01:32)
  • Summary (01:00)
Overview: Write XML (20:33)
  • Introduction (01:01)
  • Create XML Programmatically (01:57)
  • Creating XML (03:13)
  • Add or Delete Elements (03:42)
  • Removing All Node Elements (00:41)
  • Add or Delete Attributes (00:55)
  • Modify Elements/Attributes (00:50)
  • Working with Attributes (03:35)
  • Checking for Well Formed XML (03:03)
  • Summary (01:31)
In-Depth: Read XML (38:38)
  • Introduction (00:56)
  • Read XML with XmlReader (00:45)
  • XmlReader Properties (01:21)
  • XmlReader Methods (03:21)
  • Read XML Elements (04:38)
  • Read XML Attributes (02:21)
  • ReadElementContentAsDec... (01:53)
  • ReadToFollowing Method (02:07)
  • ReadToNextSibling Method (03:03)
  • ReadOuterXml Method (04:19)
  • XmlReaderSettings Class (00:30)
  • XML Schema (01:29)
  • Validate Against a Schema (01:27)
  • Read Bad XML (03:45)
  • Validate XML (05:29)
  • Summary (01:04)
In-Depth: Write XML (16:32)
  • Introduction (00:30)
  • Write with XmlWriter (00:43)
  • XmlWriter Methods (02:03)
  • XMLWriterSettings Class (01:08)
  • Write an XML Document (02:08)
  • Formatted XML (01:49)
  • Write Namespaces (01:19)
  • Write Typed Data (03:53)
  • Write u/Different Structure (02:13)
  • Summary (00:42)
In-Depth: Search XML (18:49)
  • Introduction (01:48)
  • Search with XPath (00:42)
  • System.Xml.XPath NS (00:03)
  • XPathNavigator Class (01:37)
  • XPathNodeIterator Class (00:41)
  • XPath Expressions (02:17)
  • Compiled XPath Queries (00:36)
  • Child Operator (02:21)
  • Descendant Operator (02:06)
  • Filter Operator (03:15)
  • Functions (01:39)
  • Compiled XPath (00:58)
  • Summary (00:41)

Module 10

Print Document Class (44:59)
  • Introduction (01:38)
  • Simple Reports (04:02)
  • Intro to PrintDocument Class (02:23)
  • PagePrint Event Handler (01:04)
  • PagePrint Event (06:13)
  • Creating a Tabular Report (08:23)
  • PageSettings Class (00:38)
  • PageSettings (02:41)
  • Paper Size (02:09)
  • Printer Settings Class (02:30)
  • Working with Printers (00:21)
  • List Printers (00:10)
  • Determine Default Printer (00:51)
  • Selecting a Printer (00:21)
  • Simple Properties (00:35)
  • Printer Resolutions (01:06)
  • Your Installed Printers (03:17)
  • Printers Form (04:52)
  • Summary (01:37)
Print Controls (29:58)
  • Introduction (01:19)
  • Print-Related Controls (00:48)
  • PageSetupDialog Control (01:13)
  • Demo: PageSetupDialog Ctrl. (02:14)
  • PrintDialog Class (01:48)
  • PrintPreviewDialog Control (00:30)
  • PrintPreviewControl (00:47)
  • Print Controls (03:51)
  • A More Complex Report (01:00)
  • PrintPageEventArgs Values (01:13)
  • Print Margin Issues (03:37)
  • Handling Hard Margins (01:47)
  • Better Print Margins Report (02:13)
  • Images Report (05:46)
  • Summary (01:45)
Code Access Security (24:07)
  • Introduction (01:30)
  • Overview (00:39)
  • Evidence (00:33)
  • Security Zones (01:35)
  • Security Policy (00:17)
  • Security Policy Levels (01:05)
  • Code Groups (00:33)
  • Permission sets (01:18)
  • CLR Default Security Policy (04:30)
  • How CLR Grants Permissions (01:42)
  • Configure Security Policy (00:53)
  • Run App with Default Sec Pol. (01:54)
  • How CLR Determines Perms. (02:24)
  • Create a Security Policy (03:21)
  • Test Security Policy (01:26)
  • Summary (00:20)

Module 11

Permissions (13:03)
  • Introduction (01:05)
  • Check for Permissions (01:10)
  • Code Access Permissions (03:16)
  • Imperative Syntax (00:25)
  • Declarative Syntax (01:21)
  • Demo: Imperative Syntax (03:29)
  • Demo: Declarative Syntax (01:40)
  • Summary (00:33)
Role Based Security (15:29)
  • Introduction (00:53)
  • Role Based Security (00:53)
  • Identity Object Classes (00:58)
  • Principal Object Classes (01:30)
  • PrincipalPermission Class (00:31)
  • WindowsIdentity (01:03)
  • GenericIdentity (00:27)
  • WindowsPrincipal (02:45)
  • GenericPrincipal (04:20)
  • PrincipalPermission (01:31)
  • Summary (00:33)
Setup Projects (13:30)
  • Introduction (01:03)
  • Windows Installer Deploy (01:05)
  • Setup Project Properties (02:16)
  • Create a Setup Project (00:57)
  • Run the Setup Wizard (01:49)
  • Detected Dependencies (00:21)
  • Set Project Properties (01:32)
  • Build the Setup Project (00:59)
  • Run the Setup (00:56)
  • Run the Installed App (00:36)
  • View Support Information (00:39)
  • Uninstall the App (00:40)
  • Summary (00:30)
Customize Setup Projects (18:14)
  • Introduction (00:32)
  • Intro: Deployment Editors (01:52)
  • File System Editor (01:08)
  • User Interface Editor (02:13)
  • Demo: File System Editor (05:24)
  • Demo: User Interface Editor (00:21)
  • Customize Start Dialog (02:22)
  • Add a License Dialog (00:56)
  • Add a ReadMe Dialog (02:35)
  • Summary (00:47)

Module 12

Conditions and Actions (27:57)
  • Introduction (00:51)
  • Launch Conditions Editor (01:24)
  • Search Conditions (01:03)
  • Launch Conditions (01:21)
  • Add New Launch Condition (03:00)
  • Add New Search Criteria (03:49)
  • Custom Actions Editor (02:18)
  • Display a Website (05:21)
  • Install a Windows Service (02:43)
  • Conditional Custom Actions (04:47)
  • Summary (01:15)
Attributes (29:02)
  • Introduction (01:06)
  • Introducing Attributes (01:57)
  • Attributes in .NET (02:54)
  • Attributes as Classes (01:38)
  • Abbreviate the Class Name (00:27)
  • Attributes in Managed Code (02:02)
  • Demo: Debugger Attribute (03:11)
  • Creating Custom Attributes (04:17)
  • Retrieve Attributes at Runtime (02:04)
  • System.Type Class (01:21)
  • System.Reflection.MethodInfo (00:53)
  • Attribute Class Methods (00:41)
  • Dump Attribute Info (05:33)
  • Summary (00:53)
Reflection (40:23)
  • Introduction (01:42)
  • Introducing Reflection (00:27)
  • Assemblies, Modules & Types (00:48)
  • Reflection Classes (a few) (01:13)
  • Retrieve an Assembly Ref. (00:51)
  • Demo: Retrieve Assembly Ref. (02:27)
  • Working with Types (00:25)
  • Retrieving a Type Object (01:24)
  • Retrieving Type Properties (01:04)
  • Demo: Type Properties (02:03)
  • Retrieving Type Members (00:24)
  • Demo: Get Members (04:38)
  • Reflection and Late Binding (02:37)
  • Demo: Late Binding (06:46)
  • Demo: MathForm (07:01)
  • EnableCheckMethod (02:49)
  • InvokeMethod() (02:01)
  • Summary (01:34)