Windows Forms Using C#

Current Version: 4.6
Summary

This five-day course provides a practical, hands-on introduction to GUI development using Windows Forms and C#. The course introduces database programming in Windows, including use of Language Integrated Query (LINQ). The course covers powerful newer Windows Forms features, such as controls, data binding, and ClickOnce deployment for creating smart client applications. It covers interoperability with the next-generation Windows client framework, Windows Presentation Foundation (WPF).

The course begins with a fundamental discussion of Windows Forms architecture and programming simple Windows Forms applications "from scratch." Then the use of Visual Studio 2013 and the Forms Designer is introduced, which is used throughout the remainder of the course. Simple controls are covered, such as buttons, labels, textboxes, checkboxes, radio buttons and group boxes. List controls are surveyed, including list box, combo box, list view, and DomainUpDown. Dialogs are discussed in detail, including modal and modeless dialogs and associated controls. Menus, toolbars and status bars are covered.

Advanced topics are introduced, including parent/child and owner/owned relationships, programming the Clipboard, visual inheritance, the BackgroundWorker component, and ClickOnce deployment. Advanced controls are introduced, including the tree view, tab control and SpliltContainer. Resources are discussed, including their use in localization. The Application class is covered. Applications settings are discussed, including use of configuration files and the Registry. Data access and data binding are covered. The database examples use LocalDB, which is bundled with Visual Studio 2013. The course concludes with a chapter on Windows Forms and WPF interoperation.

Numerous programming examples and exercises are provided. The student will receive a comprehensive set of notes and all the programming examples.

Prerequisites
  • Experience programming the .NET Framework using C#.
Course Objectives
On completion of this course, the student should be able to
  • Understand the fundamentals of Windows Forms architecture
  • Acquire proficiency in the use of Visual Studio to create professional class Windows applications
  • Gain a thorough grounding in the important controls provided by Windows Forms
  • Learn how to implement dialogs, menus, toolbars and status bars
  • Learn how to use advanced controls, such as tree views, splitters and tabbed dialogs
  • Understand the use of resources and application settings in Windows Forms applications
  • Learn how to implement data access using ADO.NET and binding of controls
  • Use Language Integrated Query (LINQ) to access data from Windows Forms programs
  • Learn how to interoperate between Windows Forms and WPF
Intended Audience
This course is designed for experienced application developers and architects responsible for Windows applications in a Microsoft environment.
Length
5 Days

Format
Instructor-led course, with practical computer-based exercises.

Course Outline

  • 1. Introduction to Windows Forms
    • What Are Windows Forms?
    • Windows Forms Class Hierarchy
    • Building a Form
    • The Application Class
    • Trapping Events
    • Buttons
    • Labels and Textbox Controls

  • 2. Visual Studio and the Forms Designer
    • Using the Forms Designer
    • Code Generated by Forms Designer
    • Adding Event Handlers
    • Creating Attractive Forms
    • Creating Easy To Use Forms

  • 3. Using Controls
    • Checkbox, Radio Button, and Group Box
    • Numeric Up/Down
    • Trackbar
    • Progress
    • MonthCalendar
    • DateTimePicker

  • 4. List Controls
    • Listbox and Combo box
    • DomainUpDown
    • ListView
    • Storing Objects in List Controls

  • 5. Working with Dialogs
    • Modal vs. Modeless Dialogs
    • Message Boxes
    • Common Dialogs
    • Creating a Modal Dialog
    • Configuring the Dialog Result
    • Access Data from the Dialog
    • Validating Data
    • Error Provider Control
    • Modal Dialogs
    • Creating a Modeless Dialog

  • 6. Menus, Toolbars and Status Bars
    • Main Menus
    • Context Menus
    • Building a Status Bar
    • Building a Toolbar
    • Using the Timer Control

  • 7. Advanced Windows Forms Topics
    • Parent/Child Relationships
    • Owner/Owned Relationships
    • Top-Most Forms
    • Programming the Clipboard
    • Visual Inheritance
    • BackgroundWorker Component
    • ClickOnce Deployment

  • 8. Using Advanced Controls
    • Panel
    • TreeView
    • TabControl
    • SplitContainer
    • WebBrowser

  • 9. Resources
    • Image Resources
    • Resource Files
    • String Resources
    • Working with Resources in Visual Studio
    • Resource Managers
    • Cultures and Internationalization
    • Building Localizable Forms

  • 10. Applications and Settings
    • Application Class
    • Processing and Filtering Windows Messages
    • Application Lifetime and Events
    • Configuration Files
    • Application Settings
    • Windows Registry

  • 11. Data Access
    • ADO.NET Overview
    • .NET Data Providers
    • Using LocalDB
    • DataReaders
    • Data Sets
    • Data Tables
    • Data Views
    • Interacting with XML Data
    • Language Integrated Query (LINQ)
    • Bridging Objects and Data
    • Using Object Relational Designer
    • Filtering, Ordering and Aggregation
    • Inserts, Deletes and Updates

  • 12. Data Binding
    • Data Binding Concept
    • Binding to a Control
    • Binding to a List
    • DataGrid and DataView
    • BindingSource
    • DataGridView

  • 13. Windows Forms and WPF Interoperation
    • Windows Presentation Foundation
    • Extensible Application Markup Language (XAML)
    • Mixing Forms and WPF Windows
    • Mixing Controls

  • Appendix A. Learning Resources

Hardware and Software Requirements

Required software is Visual Studio 2013, which includes LocalDB, a new lightweight version of SQL Server 2012 Express. The free Visual Studio Express 2013 for Windows Desktop can be used on the student computers. It is recommended that the instructor's computer have Visual Studio Professional 2013 or better. The operating system should be Windows 7SP1 or more recent. See the appropriate course Setup Guide for details.

A good minimal hardware profile for this course would have a 1.8 GHz or equivalent CPU, 2 GB of RAM, and at least 10 GB of free disk space for tools installation and courseware.



Notice: Undefined index: HTTP_REFERER in /var/www/datadeliverance/inc/trademarks.inc on line 3

Notice: Undefined index: HTTP_REFERER in /var/www/datadeliverance/inc/trademarks.inc on line 4

Notice: Undefined variable: REMOTE_USER in /var/www/datadeliverance/inc/trademarks.inc on line 7

Notice: Undefined index: HTTP_REFERER in /var/www/datadeliverance/inc/trademarks.inc on line 7

Notice: Undefined index: printer in /var/www/datadeliverance/inc/trademarks.inc on line 11

Go to course catalogue