Learn your way! Get started

Visual C# .NET 2003: Developing Apps

with experts Andy Baron, Ken Getz, Mary Chipman


Course at a glance

Included in these subscriptions:

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

Release date 3/3/2004
Level Intermediate
Runtime 18h 13m
Closed captioning N/A
Transcript N/A
eBooks / courseware Included
Hands-on labs Included
Sample code Included
Exams Included
Platform Internet Explorer Only


Enterprise Solutions

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



Course description

In this course, you will investigate some of the important classes and tools provided by the .NET Framework. This course focuses on important development techniques, such as building Windows Forms Controls, Code Access and Role-Based Security, Cryptography, serialization, GDI+, creating Windows services, printing, working with XML documents, and creating custom controls. You will explore ADO.NET more in-depth with topics like advanced searching, sorting, and filtering, applying constraints, creating DataRelations, using CommandBuilders, Data Binding Techniques, and manipulating XML.

Meet the experts

Andy Baron is a nationally recognized industry expert specializing in Visual Basic, Visual C#, ASP.NET, ADO.NET, SQL Server, and SQL Server Business Intelligence. He is an experienced consultant, author, and editor for several industry publications and speaker at industry conferences. Andy has also been repeatedly selected as a Microsoft MVP for his contributions to Microsoft's online support.

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.

Mary Chipman is a programmer-writer for the Data Access Technologies team at Microsoft. Previously, she was a senior consultant and was repeatedly recognized as a Microsoft MVP. Mary is the co-author of the "Microsoft Access Developer's Guide to SQL Server" (Sams) and has written additional books and articles for technical journals. She has been a frequent speaker at industry conferences and is an experienced trainer and courseware author.

Course outline



Module 1

The Tab Control (14:32)
  • Introduction (01:58)
  • Run the Sample Application (01:08)
  • Tab Control (00:37)
  • Context Menu (03:23)
  • Tab Alignment (00:17)
  • BreakIfChecked (02:05)
  • Multiline Property (03:15)
  • ToolTipText Property (00:11)
  • TabPages Property (00:53)
  • Summary (00:39)
Additional Controls (01:05:13)
  • Introduction (00:42)
  • TrackBar (52:35)
  • LinkLabel (05:11)
  • ListBox (-54:-30)
  • RadioCheck Procedure (04:34)
  • TrackBar Properties (02:57)
  • Scroll Event (02:12)
  • NumericUpDown (01:59)
  • DomainUpDown (07:48)
  • Label (01:12)
  • CheckBox (04:57)
  • Three-Value Logic (02:37)
  • CheckBox Properties (11:40)
  • RadioButton (05:06)
  • CheckChanged Event (15:17)
  • Summary (00:49)
Advanced Controls (34:09)
  • Introduction (00:39)
  • Anchoring (26:18)
  • Dialog Controls (03:30)
  • Filter Property (-27:-12)
  • CheckedListBox Control (03:17)
  • CheckedListBox.ItemCheck (06:44)
  • Docking (01:28)
  • AutoScroll (01:30)
  • Splitter Control (11:01)
  • OpenFileDialog (00:38)
  • ColorDialog (00:35)
  • FontDialog (05:14)
  • Summary (00:23)

Module 2

Security in the CLR (16:41)
  • Introduction (00:41)
  • Code Has Permissions (00:37)
  • Managed/Unmanaged Code (01:03)
  • CAS Concepts (04:09)
  • Security Policy in the CLR (02:20)
  • .NET Framework Config (-03:-19)
  • Stack Walk (06:52)
  • Code Groups (01:55)
  • Config Folders (02:02)
  • Summary (00:17)
Working with Assemblies (26:00)
  • Introduction (00:26)
  • Parts of an Assembly (20:12)
  • Creating Evidence (-05:-08)
  • Run with Full Trust (06:26)
  • Creating Evidence (-20:-02)
  • Private Assemblies (00:44)
  • Strong-Named Assemblies (02:13)
  • Viewing Assembly Contents (01:47)
  • Digital Signing (03:52)
  • Digital Signing and CLR (01:34)
  • Generating a Key Pair (01:36)
  • AssemblyInfo.cs (03:30)
  • Running with Limited Trust (08:27)
  • Summary (00:21)
Getting Started with XML (30:43)
  • Introduction (01:11)
  • XML Document Model (27:20)
  • Retrieve Just Text Nodes (-25:-32)
  • Tree-Based XML (03:40)
  • Non-Cached XML (00:39)
  • What Is XML DOM? (00:41)
  • Investigating the Sample (03:32)
  • Loading XML Data (03:37)
  • Work with Child Nodes (03:11)
  • Iterate Through All Nodes (04:13)
  • Retrieve Element Nodes (07:45)
  • Summary (00:22)
Working with XML (34:32)
  • Introduction (00:33)
  • Nodes Matching Criterion (29:03)
  • Modify Attribute Values (-26:-51)
  • SelectNodes with XPath (04:15)
  • More About XPath (01:33)
  • Reference to Specific Node (05:25)
  • Retrieve a Single Attribute (12:35)
  • Work with Attributes (04:19)
  • If XML Isn"t Well Formed (00:49)
  • XML Loading Errors (-27:-29)
  • Get a Reference to a Node (05:37)
  • Navigate to Related Nodes (02:04)
  • Retrieve Attributes of a Node (03:39)
  • Creating XML (06:23)
  • Add or Delete Nodes (04:02)
  • Remove All Nodes/Attributes (-24:-37)
  • Getting Started with XPath (27:46)
  • Modify Element Values (04:31)
  • Summary (00:50)

Module 3

Drawing on Forms (44:05)
  • Introduction (00:57)
  • OwnerDraw Controls (07:07)
  • FillColorArray Code (06:11)
  • Objects Used for Drawing (-02:-19)
  • DrawMode (00:44)
  • OwnerDraw ComboBox (04:35)
  • Shapes and Text (16:29)
  • Hatch Styles (01:12)
  • Drawing and Filling Shapes (05:05)
  • Overriding OnPaint (-42:-06)
  • Run the Sample (05:55)
  • Code for frmDrawing (39:46)
  • Summary (00:24)
Creating Transparent Areas (20:17)
  • Introduction (01:09)
  • TransparencyKey (03:22)
  • Create OwnerDraw Menus (00:57)
  • MeasureItem Event (00:39)
  • DrawItem Event (05:45)
  • Creating Shaped Forms (02:14)
  • Opacity (00:35)
  • Code for frmShape (01:52)
  • btnShape_Click (01:09)
  • btnClose_Click (01:33)
  • Summary (00:56)
Printing in .NET (35:30)
  • Introduction (01:02)
  • SetUpPrintDocument (02:22)
  • BeginPrint Event (-05:-09)
  • PrintDocument Class (-05:-26)
  • Printing in .NET (00:50)
  • A Simple Report (21:53)
  • PageSettings Class (-06:-01)
  • Make a Tabular Report (-13:-04)
  • PrintPreview Dialog Box (25:33)
  • PrinterSettings Class (02:38)
  • Working with Printers (03:14)
  • Retrieve Printer Settings (07:03)
  • Summary (00:34)
Using Print-Related Controls (26:36)
  • Introduction (00:31)
  • Print-Related Controls (10:58)
  • PrintPageEventArgs Values (01:51)
  • Graphics.VisibleClipBounds (05:18)
  • Setting Up Printing (01:16)
  • BeginPrint Event Handler (00:32)
  • Headers and Footers (01:22)
  • PrintPage Event (-19:-03)
  • PageSetupDialog Control (01:41)
  • PrintDialog Class (01:23)
  • PrintPreviewControl (03:23)
  • More Complex Reports (01:21)
  • Page Dimensions (-09:-09)
  • HandlePrintDoc (05:26)
  • Document Property (19:01)
  • Summary (00:40)

Module 4

Understanding Inheritance (31:16)
  • Introduction (03:27)
  • Understanding Inheritance (21:09)
  • Polymorphism (01:07)
  • Delegation (01:45)
  • Factoring/Refactoring (01:15)
  • Upcasting/Downcasting (-23:-07)
  • Base Class (00:30)
  • Derived Class (02:26)
  • Overriding (03:12)
  • Virtual (02:30)
  • Hiding Base Class Members (03:22)
  • Protected (01:09)
  • Abstract (02:12)
  • Interface (09:13)
  • Summary (00:57)
Working with Inheritance (59:59)
  • Introduction (00:20)
  • Look at the Sample (31:28)
  • Polymorphism (03:45)
  • Interfaces (09:13)
  • IComparable (07:24)
  • IComparer (03:01)
  • Testing Sorting (-52:-17)
  • Private to Protected (00:06)
  • Overridable Methods (08:58)
  • Dervied Classes (00:47)
  • Overriding a Method (01:06)
  • Testing Classes (03:13)
  • Overriding Example (00:55)
  • Deriving from GroupBox (09:40)
  • Adding a Custom Event (31:26)
  • Summary (00:47)
Introducing Windows Services (16:12)
  • Introduction (00:36)
  • Windows Services (14:32)
  • Uninstall the Service (-12:-25)
  • Windows Services -- .NET (00:35)
  • Things to Consider (01:59)
  • Create a Windows Service (00:46)
  • Investigate the Code (02:12)
  • Set Service Properties (01:25)
  • Add the Installer (02:21)
  • Build and Install the Service (02:02)
  • Test the Service (01:42)
  • Summary (00:22)
FileWatcher Service (17:02)
  • Introduction (00:36)
  • FileSystemWatcher Class (02:47)
  • Investigate the Sample (02:12)
  • Event Handling Code (01:28)
  • OnStart Event Procedure (05:23)
  • Debugging Your Service (04:05)
  • Summary (00:28)

Module 5

Cryptography Concepts (14:06)
  • Introduction (00:28)
  • Fundamental Concepts (11:33)
  • Encrypt Using -- Public Key (00:54)
  • Decrypt Using -- Private Key (-11:-21)
  • Symmetric Cryptography (01:29)
  • Asymmetric Cryptography (00:42)
  • Cryptographic Concepts (01:34)
  • Use Symmetric Encryption (02:56)
  • Symmetric Decryption (01:00)
  • Symmetric Encryption (00:33)
  • Use Asym. Cryptography (01:11)
  • Generating a Key Pair (02:51)
  • Summary (00:10)
Hash Codes, Digital Signatures (21:47)
  • Introduction (00:25)
  • Hash Codes (12:56)
  • Create Hard-Coded keys (04:43)
  • Generating Random Values (-16:-13)
  • How Hashing Works (00:49)
  • Hash Classes (00:49)
  • Calculating a Hash (02:17)
  • Verifying a Hash (01:25)
  • Digital Signatures (01:38)
  • Generating a Signature (02:20)
  • Verifying a Signature (01:42)
  • Generating Random Keys (08:37)
  • Summary (00:13)
Code Access Security (58:30)
  • Introduction (01:13)
  • Code Execution Criteria (40:42)
  • Request Permission Sets (06:27)
  • Imperative Permissions (04:32)
  • Permission Techniques (-47:-39)
  • SecurityNetSetup.bat (07:01)
  • Open CodeAccessSecurity (01:44)
  • Minimum Permissions (04:26)
  • .NET Configuration Tool (06:39)
  • Strong-Named Assembly (05:16)
  • Optional Permissions (04:26)
  • Opt vs Min Permissions (01:25)
  • Refusing Permissions (21:32)
  • Summary (00:40)
Determine Effective Permissions (34:23)
  • Introduction (00:58)
  • Code Groups and Evidence (09:53)
  • Work with Permissions Sets (02:08)
  • Permissions Across Levels (03:11)
  • Single Permissions (12:26)
  • Multi-level Permissions (01:52)
  • The Stack Walk (02:22)
  • Summary (01:30)

Module 6

Role-Based Security (27:17)
  • Introduction (00:32)
  • Authentication (14:20)
  • Enabling Controls (01:55)
  • Imp. Role-Based Security (08:30)
  • Decl. Role-Based Security (-23:-18)
  • Create Users and Groups (01:31)
  • System.Security.Principal (02:56)
  • Create GenericIdentity (01:56)
  • Create WindowsIdentity (01:17)
  • Get AnonymousUser (00:39)
  • Get WindowsPrincipal (00:15)
  • IsInRole Enumeration (00:25)
  • IsInRole Custom (15:50)
  • Summary (00:22)
Implementing App Security (08:42)
  • Introduction (00:38)
  • Examine the Sample (02:16)
  • Generic Role-Based Security (03:02)
  • Code Behind the Buttons (02:29)
  • Summary (00:15)
Introducing Serialization (26:24)
  • Introduction (01:06)
  • Serialization/Deserialization (02:20)
  • Using Serialization (02:17)
  • Serialization vs Persistence (00:55)
  • .NET Framework / Serialization (00:25)
  • Formatter Objects (02:55)
  • Generalize Serialization (04:59)
  • Serialize Your Classes (07:36)
  • Extra Info Serialized (03:01)
  • Summary (00:45)
Serializing Complex Objects (20:49)
  • Introduction (00:54)
  • Investigating the Sample (02:07)
  • Fill Hierarchy with Data (02:23)
  • Fill Object Graph Code (02:38)
  • Serializing Object Graph (02:11)
  • Cloning Objects (00:47)
  • memberwiseClone Method (01:24)
  • Shallow and Deep Clones (03:03)
  • Creating a Deep Clone (02:35)
  • Serializing Multiple Objects (02:07)
  • Summary (00:35)
Configuring Serialization (15:43)
  • Introduction (00:44)
  • Investigating the Sample (00:54)
  • Running the Sample (02:53)
  • Efficiently Storing Data (00:52)
  • Custom Serialization (02:25)
  • Serializing to a BitArray (00:-58)
  • SerializationInfo Object (02:08)
  • Custom Constructor (00:43)
  • Run the Sample Again (01:29)
  • SurveyDataCompact Code (03:48)
  • Summary (00:40)

Module 7

Understanding Isolated Storage (44:57)
  • Introduction (01:05)
  • Uses for Isolated Storage (25:25)
  • Storing Settings (11:15)
  • Isolation Scope (01:37)
  • Controlling Scope Snippets (-33:-18)
  • Isolated Storage Benefits (03:10)
  • Isolated Storage Pitfalls (03:24)
  • Obtain a Store (03:32)
  • Create a Directory (02:15)
  • Create a File (03:23)
  • Write to a File (01:37)
  • Read from a File (01:57)
  • Delete a File (18:52)
  • Summary (00:39)
Admin. Isloated Storage (05:54)
  • Introduction (00:42)
  • Permission Risks (02:37)
  • Isolated Storage Folders (01:49)
  • Summary (00:45)
Create Custom Controls (22:18)
  • Introduction (00:39)
  • Control Creation (19:32)
  • Adding a Description (-18:-34)
  • Inheriting from a Control (01:08)
  • Required Steps (00:50)
  • Creating a Textbox (02:59)
  • Adding Control to Toolbox (01:12)
  • Add Code to Textbox (06:59)
  • Assigning a Toolbox Icon (03:36)
  • Hiding a Property (00:46)
  • Assign a Property Category (02:39)
  • Summary (00:27)
Drawing Your Own Controls (32:11)
  • Introduction (00:48)
  • Inheriting from Base Class (24:45)
  • Font Property (01:14)
  • Handling Events (02:51)
  • Data Binding (-27:-52)
  • Control Properties (03:28)
  • Drawing the Control (05:26)
  • Default Properties (03:29)
  • Raising Events (02:17)
  • Hiding Properties (02:05)
  • Ease-of-Use Features (01:29)
  • Composite Controls (01:27)
  • Sample Control (09:58)
  • Summary (00:42)

Module 8

DataSets (23:31)
  • Introduction (00:28)
  • The DataSet (17:33)
  • Multiple Results Sets (-14:-15)
  • The DataTable (02:11)
  • Populating a DataTable (01:05)
  • Define DataTable Columns (00:46)
  • Adding Rows (00:37)
  • Binding a DataGrid (00:10)
  • DataAdapter Cmd Objects (01:22)
  • SelectCommand (04:07)
  • Filling a DataTable (09:11)
  • Summary (00:13)
Filling DataSets (12:59)
  • Introduction (00:32)
  • Retrieving Schema Info (01:03)
  • DataColumns and Schema (01:48)
  • AddWithKey (01:23)
  • Fill Schema (02:34)
  • DataSets and XML (01:33)
  • Read/Write XML Data (03:51)
  • Summary (00:12)
Working with DataTables (16:28)
  • Introduction (00:46)
  • Examine the Sample (00:51)
  • Display the Results (01:25)
  • Search by Primary Key (01:22)
  • Multi-Column Primary Key (02:13)
  • Simple Dynamic Searches (01:41)
  • Search with WildCards (01:29)
  • Manage Delimiters (02:31)
  • Search with Sort (00:52)
  • Search with RowState (02:31)
  • Summary (00:43)
Working with DataViews (21:11)
  • Introduction (00:56)
  • What Is a DataView? (00:19)
  • Sorting Data with DataViews (03:27)
  • Filtering Rows (01:17)
  • Filter on RowState (01:31)
  • RowState Values (03:31)
  • Iterate through DataView (01:24)
  • Find Single Row (06:05)
  • Find Rows (01:51)
  • Summary (00:45)
Using Constraints (16:41)
  • Introduction (00:34)
  • Primary Keys (01:43)
  • FillTwice Code (01:29)
  • with Unique Code (00:51)
  • with Primary Key Code (03:34)
  • Merging DataSets (02:54)
  • Foreign Key Contstraints (05:18)
  • Summary (00:16)
Other Constraints (08:43)
  • Introduction (00:27)
  • Other Constraints (02:42)
  • Disallows Nulls (02:04)
  • Set MaxLength (01:35)
  • Set Default Values (01:34)
  • Summary (00:18)

Module 9

DataRelations (13:02)
  • Introduction (00:29)
  • Creating DataRelations (00:25)
  • Database Relationships (02:50)
  • Run the Sample (02:48)
  • DataRelation Object (01:36)
  • DataRelations in ADO.NET (00:21)
  • SetRelations Method (04:14)
  • Summary (00:16)
More on DataRelations (13:42)
  • Introduction (00:24)
  • Run the Sample (01:39)
  • Navigation Class (01:23)
  • GetChildRows (00:37)
  • GetParentRows (00:50)
  • Expressions / Relations (02:32)
  • Aggregate Expressions (01:23)
  • Lookup Expressions (01:41)
  • Specify XML Nesting (02:50)
  • Summary (00:17)
Updating Data (37:39)
  • Introduction (01:06)
  • Run the Sample (32:05)
  • GetChanges (00:52)
  • RejectChanges (-30:-29)
  • Generating Commands (00:36)
  • CommandBuilder Disadv. (01:12)
  • Specifying Parameters (06:27)
  • Code Behind the Sample (00:27)
  • Update / CommandBuilder (05:06)
  • Update / DataAdapter (01:10)
  • RowState (07:47)
  • GetChanges and RowState (10:04)
  • Summary (01:11)
Using Stored Procedures (31:59)
  • Introduction (01:25)
  • Advantages (05:42)
  • Server Explorer (03:27)
  • Using Stored Procedures (01:30)
  • Create a Stored Procedure (06:36)
  • Insert Stored Procedure (06:46)
  • Delete Stored Procedure (04:37)
  • Assigning Commands (00:14)
  • Update / DataAdapter (00:28)
  • Summary (01:11)

Module 10

DataBinding Techniques (24:05)
  • Introduction (00:30)
  • BindingContext (02:34)
  • Master-Detail Forms (02:29)
  • Retrieving Values (01:58)
  • Config DataGrid Properties (03:08)
  • Configure DataGrid in Code (00:46)
  • Read-Only Columns (00:18)
  • Inserts, Updates, Deletes (04:32)
  • Binding ListBox to Array (02:13)
  • Add to a ListBox in Code (05:18)
  • Summary (00:14)
Work with Images (12:21)
  • Introduction (00:38)
  • Run the Sample (02:46)
  • Read Image Data (04:04)
  • Load Images from Files (01:09)
  • Save Images to a Database (03:17)
  • Summary (00:23)
ADO.NET and XML (36:43)
  • Introduction (00:44)
  • Reading and Writing XML (29:09)
  • Using Internal Schema (01:24)
  • Using External Schema (00:54)
  • Reading a DiffGram (01:44)
  • Load DataSet - XML String (-29:-47)
  • Work with XML in Code (05:15)
  • GetXML Method (02:10)
  • DataSet XML Output (04:41)
  • WriteXML Method (06:48)
  • XML Output as a DiffGram (02:41)
  • Schema and DiffGram Info (02:16)
  • Load XML Data Into DataSet (00:16)
  • Inferring a Schema (07:56)
  • Summary (00:27)
DataSets and XML (17:56)
  • Introduction (00:59)
  • DataSets and XML (01:18)
  • Using an XmlDataDocument (06:41)
  • Format XML Data with XSLT (03:49)
  • Query DataSet Data - XPath (03:50)
  • Summary (01:16)