Free Sample
+ Collection

GDI+ Application Custom Controls with Visual C# 2005

Adam Ward, Dragos Brezoi, Iulian Serban, Tiberiu Radu

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

Want this title & more?

$12.99 p/month

Subscribe to PacktLib

Enjoy full and instant access to over 2000 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
Chapter 2: Introduction to GDI+
Understanding Control Drawing
Simple Drawing on a Form
Drawing Inside a Panel Object
Drawing Inside a Control
Chapter 3: Basic Drawing
The GDI+ Coordinate System
Drawing with GDI+
Building the GradientLabel Control
Chapter 4: Drawing Complex Shapes and Using Transformations
Drawing Complex Shapes
Clipping Drawing Using Region Objects
Graphics Transformations
Creating the Clock Control
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
Chapter 6: Working with Images
Drawing Images
Image Effects
Skewing, Rotation, and Scaling
The ImageWarperControl
Chapter 7: Printing
.NET Printing Explained
Your First Print Job
The SimpleReportPrinter
User Involvement
Our Responsibilities as Programmers
Printing Custom Controls
Chapter 8: Collections
Collections in the .NET Framework
Building the Font Picker
Chapter 9: Double Buffering
Introduction to Double Buffering
The Scroll Bar
Chapter 10: Handling Mouse Events
Handling Mouse Events
Dragging and Dropping
Dragging and Dropping
Chapter 11: Implementing Design-Time Support
Building Designer-Friendly Controls
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
Chapter 13: The PieChart Control
Creating the PieChart Control
Adding Slice Names and Delimiters
PieChart Legend
Printing the PieChart
Adding and Removing Slices

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


Read More