GDI+ Application Custom Controls with Visual C# 2005


GDI+ Application Custom Controls with Visual C# 2005
eBook: $20.99
Formats: PDF, PacktLib, ePub and Mobi formats
$10.50
save 50%!
Print + free eBook + free PacktLib access to the book: $55.98    Print cover: $34.99
$34.99
save 37%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Overview
Table of Contents
Author
Support
Sample Chapters
  • Learn about custom controls and the GDI+
  • Walks through great examples like PieChart control
  • Customize and develop your own controls

Book Details

Language : English
Paperback : 276 pages [ 235mm x 191mm ]
Release Date : July 2006
ISBN : 1904811604
ISBN 13 : 9781904811602
Author(s) : Adam Ward, Dragos Brezoi, Iulian Serban, Tiberiu Radu
Topics and Technologies : All Books, Application Development, Microsoft Other, Enterprise, Microsoft


Table of Contents

Preface
Chapter 1: Introduction to Custom Controls
Chapter 2: Introduction to GDI+
Chapter 3: Basic Drawing
Chapter 4: Drawing Complex Shapes and Using Transformations
Chapter 5: Drawing Control Parts, Borders, and Adornments
Chapter 6: Working with Images
Chapter 7: Printing
Chapter 8: Collections
Chapter 9: Double Buffering
Chapter 10: Handling Mouse Events
Chapter 11: Implementing Design-Time Support
Chapter 12: Designing Intuitive Interfaces
Chapter 13: The PieChart Control
Appendix A: Distributing Custom Controls
Index
  • Chapter 1: Introduction to Custom Controls
    • What Are Controls?
    • Introducing Custom Controls
      • Categories of User Controls
    • Preparing Your Environment
    • What Are Custom Controls Made Of?
      • Private Fields
      • Properties
      • Indexers
      • Events and Delegates
        • Handling Events
      • Collections
      • Enums
    • Building TinyNoiseMaker
      • Time for Action—Creating the TinyNoiseMaker Custom Control
  • Extending TinyNoiseMaker
    • Time for Action—Adding Public Functionality
    • Time for Action—Using the Control's Public Interface
  • Summary
  • Chapter 2: Introduction to GDI+
    • Understanding Control Drawing
      • Understanding GDI+
      • The Graphics Object
      • The Control.Paint Event
      • Invalidation
    • Simple Drawing on a Form
      • Time for Action—Creating the Application
  • Drawing Inside a Panel Object
    • Time for Action—Creating the Application
  • Drawing Inside a Control
    • Time for Action—Creating the Application
  • Summary
  • Chapter 3: Basic Drawing
    • The GDI+ Coordinate System
    • Drawing with GDI+
      • Using the Color Object
      • Drawing Using the Pen Object
      • Filling Surfaces Using the Brush Object
      • Drawing Text Using the Font Object
      • Improving Drawing Quality
    • Building the GradientLabel Control
      • Time for Action—Creating the GradientLabel Custom Control
  • Summary
  • Chapter 4: Drawing Complex Shapes and Using Transformations
    • Drawing Complex Shapes
      • The GraphicsPath Object
      • The Region Object
    • Clipping Drawing Using Region Objects
      • Keeping Drawing Inside a Region
      • Keeping Drawing Outside a Region
    • Graphics Transformations
      • Translation
      • Rotation
      • Scaling
    • Creating the Clock Control
      • Time for Action—Creating the Clock Control
      • Time for Action—Updating the Clock to Use Transformations
  • Summary
  • Chapter 5: Drawing Control Parts, Borders, and Adornments
    • Rendering Common Control Parts
      • Drawing Buttons
      • Drawing Caption Buttons
      • Drawing Checkboxes
      • Drawing Drop-Down Buttons
      • Drawing Radio Buttons
      • Drawing Scroll Buttons
    • Rendering Borders and Frames
      • Rendering Button Borders
      • Rendering 3D Borders
    • Rendering Control Adornments
    • Creating Multiple Controls that Reuse the Same Functionality
      • Creating a Base Class for Two or More Controls
        • Time for Action—Creating the ControlPart Base Class
    • Creating Derived Controls
      • Time for Action—Creating the ScrollArrowButton Control
      • Time for Action—Creating the CheckButton Control
  • Extending Existing Controls
    • Time for Action—Creating the BorderGradientPanel Control
    • Time for Action—Implementing the GradientButton Control
  • Summary
  • Chapter 6: Working with Images
    • Drawing Images
      • Using the Image Class
      • Using the Bitmap Class
      • Displaying Images
        • Time for Action—Displaying Images
    • Image Effects
    • Skewing, Rotation, and Scaling
  • Building the ImageWarper Class
    • Time for Action—Creating the ImageWarper Class
  • The ImageWarperControl
    • Time for Action—Creating the ImageWarperApp and the Image WarperControl
  • Summary
  • Chapter 7: Printing
    • .NET Printing Explained
      • Using the PrintDocument Class
    • Your First Print Job
      • Time for Action—Creating the "Hello Printer!" Application
  • The SimpleReportPrinter
    • Building the SimpleReportPrinter and TextDispenser Classes
      • Time for Action—Building the TextDispenser Class
      • Time for Action—Building the SimpleReportPrinter Class
  • User Involvement
  • Our Responsibilities as Programmers
  • Printing Custom Controls
    • Time for Action—Creating the PrintableRichTextBox
  • Summary
  • Chapter 8: Collections
    • Collections in the .NET Framework
      • ArrayList
      • Queue
      • Stack
      • SortedList
    • Generics
    • Building the Font Picker
      • Time for Action—Building Font Picker
  • Summary
  • Chapter 9: Double Buffering
    • Introduction to Double Buffering
    • The Scroll Bar
      • Scroll that Text!
        • Time for Action—Building FlickerFree Control
  • Summary
  • Chapter 10: Handling Mouse Events
    • Handling Mouse Events
      • Working with Coordinates
    • Dragging and Dropping
      • Dragging
        • Time for Action—Dragging
    • Dragging and Dropping
      • Time for Action—Dragging and Dropping
  • Summary
  • Chapter 11: Implementing Design-Time Support
    • Building Designer-Friendly Controls
      • Attributes
      • Designers
      • Type Converters
      • UI Type Editors
      • Property Editors
        • Creating Property Editors
          • Time for Action—Adding Design-Time Support
    • Summary
  • Chapter 12: Designing Intuitive Interfaces
    • The Relationship between User and Computer
      • Communicating with Users
    • Requests, Input Parsing, Fault Tolerance, and Feedback
      • Examining the Sketcher Control
    • Looking Further Into Input Parsing
      • How Can We Use Regex to Our Advantage?
        • Time for Action—Creating the Regex Application
    • Our Regex Pattern in Detail
  • Optimization and Coding Conventions
  • Summary
  • Adding Slice Names and Delimiters
    • Time for Action—Improving the PieChart Control
  • PieChart Legend
    • Time for Action—Creating the PieChart Legend
  • Printing the PieChart
    • Time for Action—The Printable PieChart
  • Adding and Removing Slices
    • Time for Action—Add Application Support for PieChart Slice Add/Remove Operations
  • Summary

Adam Ward

Adam Ward works for a communications technology company in Derby, England. Adam excels in experimental programming techniques and has a particular interest in high-speed algorithms and graphical methods. His professional work is based in a varied Research and Development environment and he thrives on tasks requiring innovation, skill, and fine-tuning. He has also been involved in experimental coding collaborations showcasing the power of C#. Away from work, Adam is turning his attentions to Linux systems and especially cross-platform programming under .NET-compatible systems.


Dragos Brezoi

Dragos Brezoi started programming to create an application for processing and adding extra effects to his guitar's sound. Several years after, he got a Masters Degree in Computer Science from the Politehnica University of Bucharest, and is now researching for a Ph.D. in Advanced Automatics. Dragos currently works as a programmer for Mikon Systems, developing industrial software. His skills cover a wide area of specialization from PLC and DSP programming to SCADA, OPC, and DCS solutions. At this moment he is creating professional human-machine interfaces, with a focus on developing advanced custom controls with C#.


Iulian Serban

Iulian Serban is a software architect who started programming at a very young age. He evolved through a lot of programming languages including Pascal, Delphi, C++ Builder, Visual C++ with MFC and finally .NET and C #. By the age of 17 he started working for Syncfusion, one of the largest .NET control builders in the US, writing code for professional custom controls. Nowadays he devotes most of his spare time to his own IT business, which is set to release significant software projects soon.


Tiberiu Radu

Tiberiu Radu has been working with computers for over 10 years now, programming in a wide range of languages including Pascal, C/C++, Visual Basic, Delphi, and C#. As a Microsoft Student Partner in the Microsoft Academic Program, he's devoting a lot of time to many .NET-related technologies. Tiberiu is in the last year of studies with the Automatic Control and Computers Faculty of the Politehnica University of Bucharest. While researching for his own IT security business, he developed skills in embedded programming and new web technologies, and is seeking new and innovating networking security solutions.

Sorry, we don't have any reviews for this title yet.

Code Downloads

Download the code and support files for this book.


Submit Errata

Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.


Errata

- 1 submitted: last submission 12 Nov 2013

page 32 Code 10 Sep 09
After tinyNoiseMaker1.FileName = "...." should be one ";", not 2.

Sample chapters

You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

Frequently bought together

GDI+ Application Custom Controls with Visual C# 2005 +    Practical Plone 3: A Beginner's Guide to Building Powerful Websites =
50% Off
the second eBook
Price for both: $30.00

Buy both these recommended eBooks together and get 50% off the cheapest eBook.

What you will learn from this book

  • 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

If you want to build custom controls with C# but you don't know where to start, or you are intimidated by the huge amount of information that needs to be absorbed, then this book is for you. This friendly tutorial is based on numerous examples with real-world applicability, and includes a case study featuring the development of a fully functional PieChart control.

Showing you how to use the free Visual C# 2005 Express Edition environment to develop your controls, GDI+ Custom Controls with Visual C# 2005 will teach you how to create professional, reusable custom controls for your desktop applications in no time.

Approach

Throughout the book the emphasis is on using examples to illustrate concepts and techniques. Code is shown in detail, and explained thoroughly. The examples themselves are intended to be both intructional and useful in their own right.

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

Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Resources
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software