Chapter 11: Graphics using GDI


Overview

Using the .NET framework class library's Win Form controls is not the only way to graphically present data to the user. Win Form controls are powerful, there is no doubt about it, but there are still going to be times when you will want more control over what exactly is displayed by the computer than Win Form controls can provide. This chapter covers another major method of displaying data to Windows applications: GDI+.

Unlike in a Win Forms application, when you write GDI+ code, you do it from scratch. There are no GUI drag-and-drop tools available to ease development, though you still lay out the form on which you plan to use GDI+ with the GUI design tool. The entire form does not need to be the target of the GDI+ images. Instead, GDI+ images can be painted on any control. Thus, you can develop a complex form and designate only a small portion of the form to working with GDI+.

In this chapter you will see just how easy it is to develop applications using GDI+. You will start with a high-level overview of GDI+ by looking at what it is and what it consists of. You will then look in detail at some of its functionality, such as fonts, pens, colors, and lines. Once you have covered the basics of GDI+, you will then look at more advanced topics, such as scrolling, optimization, and double buffering. Finally, to round off the discussion, you will discover that GDI+ is not just for displaying data to your monitor—you can also use it on printers.

At first glance, you might think this chapter is solely for the graphics guru. This is somewhat true, but many of the topics presented in this chapter are used by other areas of the .NET Framework class library such as Win Forms and Web Forms. For example, the Font class and the Color, Size, and Position structures are used frequently in Win Forms and Web Forms. Graphics gurus will want to read this chapter, and the average Win Forms or Web Forms developer should probably skim this chapter as well.




Managed C++ and. NET Development
Managed C++ and .NET Development: Visual Studio .NET 2003 Edition
ISBN: 1590590333
EAN: 2147483647
Year: 2005
Pages: 169

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net