GDI+ Application Custom Controls with Visual C# 2005

A fast-paced example-driven tutorial to building custom controls using Visual C# 2005 Express Edition and .NET 2.0

GDI+ Application Custom Controls with Visual C# 2005

Progressing
Adam Ward et al.

A fast-paced example-driven tutorial to building custom controls using Visual C# 2005 Express Edition and .NET 2.0
$10.50
$34.99
RRP $20.99
RRP $34.99
eBook
Print + eBook
$12.99 p/month

Get Access

Get Unlimited Access to every Packt eBook and Video course

Enjoy full and instant access to over 3000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

Book Details

ISBN 139781904811602
Paperback276 pages

About This Book

  • Learn about custom controls and the GDI+
  • Walks through great examples like PieChart control
  • Customize and develop your own controls

Who This Book Is For

This book has been written with the intermediate C# developer in mind. Assuming a working knowledge of C#, the book teaches you how to implement custom controls using Visual C# 2005 Express Edition and all other versions of Visual C#, and GDI+ with .NET 2.0

Table of Contents

Chapter 1: Introduction to Custom Controls
What Are Controls?
Introducing Custom Controls
Preparing Your Environment
What Are Custom Controls Made Of?
Building TinyNoiseMaker
Extending TinyNoiseMaker
Summary
Chapter 2: Introduction to GDI+
Understanding Control Drawing
Simple Drawing on a Form
Drawing Inside a Panel Object
Drawing Inside a Control
Summary
Chapter 3: Basic Drawing
The GDI+ Coordinate System
Drawing with GDI+
Building the GradientLabel Control
Summary
Chapter 4: Drawing Complex Shapes and Using Transformations
Drawing Complex Shapes
Clipping Drawing Using Region Objects
Graphics Transformations
Creating the Clock Control
Summary
Chapter 5: Drawing Control Parts, Borders, and Adornments
Rendering Common Control Parts
Rendering Borders and Frames
Rendering Control Adornments
Creating Multiple Controls that Reuse the Same Functionality
Creating Derived Controls
Extending Existing Controls
Summary
Chapter 6: Working with Images
Drawing Images
Image Effects
Skewing, Rotation, and Scaling
The ImageWarperControl
Summary
Chapter 7: Printing
.NET Printing Explained
Your First Print Job
The SimpleReportPrinter
User Involvement
Our Responsibilities as Programmers
Printing Custom Controls
Summary
Chapter 8: Collections
Collections in the .NET Framework
Generics
Building the Font Picker
Summary
Chapter 9: Double Buffering
Introduction to Double Buffering
The Scroll Bar
Summary
Chapter 10: Handling Mouse Events
Handling Mouse Events
Dragging and Dropping
Dragging and Dropping
Summary
Chapter 11: Implementing Design-Time Support
Building Designer-Friendly Controls
Summary
Chapter 12: Designing Intuitive Interfaces
The Relationship between User and Computer
Requests, Input Parsing, Fault Tolerance, and Feedback
Looking Further Into Input Parsing
Our Regex Pattern in Detail
Optimization and Coding Conventions
Summary
Chapter 13: The PieChart Control
Creating the PieChart Control
Adding Slice Names and Delimiters
PieChart Legend
Printing the PieChart
Adding and Removing Slices
Summary

What You Will Learn

  • Understand the basics of custom controls
  • Use GDI+ to draw your own controls
  • Implement double buffering to speed up your forms
  • Add printing functionality to your custom controls
  • Handle the mouse events to improve the user experience
  • Offer design-time support for programmers using your control
  • Design intuitive interfaces for your users

In Detail

Authors

Table of Contents

Chapter 1: Introduction to Custom Controls
What Are Controls?
Introducing Custom Controls
Preparing Your Environment
What Are Custom Controls Made Of?
Building TinyNoiseMaker
Extending TinyNoiseMaker
Summary
Chapter 2: Introduction to GDI+
Understanding Control Drawing
Simple Drawing on a Form
Drawing Inside a Panel Object
Drawing Inside a Control
Summary
Chapter 3: Basic Drawing
The GDI+ Coordinate System
Drawing with GDI+
Building the GradientLabel Control
Summary
Chapter 4: Drawing Complex Shapes and Using Transformations
Drawing Complex Shapes
Clipping Drawing Using Region Objects
Graphics Transformations
Creating the Clock Control
Summary
Chapter 5: Drawing Control Parts, Borders, and Adornments
Rendering Common Control Parts
Rendering Borders and Frames
Rendering Control Adornments
Creating Multiple Controls that Reuse the Same Functionality
Creating Derived Controls
Extending Existing Controls
Summary
Chapter 6: Working with Images
Drawing Images
Image Effects
Skewing, Rotation, and Scaling
The ImageWarperControl
Summary
Chapter 7: Printing
.NET Printing Explained
Your First Print Job
The SimpleReportPrinter
User Involvement
Our Responsibilities as Programmers
Printing Custom Controls
Summary
Chapter 8: Collections
Collections in the .NET Framework
Generics
Building the Font Picker
Summary
Chapter 9: Double Buffering
Introduction to Double Buffering
The Scroll Bar
Summary
Chapter 10: Handling Mouse Events
Handling Mouse Events
Dragging and Dropping
Dragging and Dropping
Summary
Chapter 11: Implementing Design-Time Support
Building Designer-Friendly Controls
Summary
Chapter 12: Designing Intuitive Interfaces
The Relationship between User and Computer
Requests, Input Parsing, Fault Tolerance, and Feedback
Looking Further Into Input Parsing
Our Regex Pattern in Detail
Optimization and Coding Conventions
Summary
Chapter 13: The PieChart Control
Creating the PieChart Control
Adding Slice Names and Delimiters
PieChart Legend
Printing the PieChart
Adding and Removing Slices
Summary

Book Details

ISBN 139781904811602
Paperback276 pages
Read More