Chapter 21. Graphics Programming

This chapter describes how to display graphics on a form or custom a control, and discusses how to draw shapes, lines, text, and bitmaps using the Graphics object created from a form or custom control or passed as part of PaintEvent­Args in the OnPaint event of a form or a custom control. This chapter also covers how to load bitmaps, icons, and fonts.

The ability to programmatically create graphics can be extremely useful in a number of scenarios. For example, suppose you need to create an application that dynamically displays a graph of sales figures over a period of time. The examples in this chapter are taken from a sample application, SalesGraphs, which produces different graphs for the sales figures over a ...

Get Microsoft® .NET Compact Framework (Core Reference) now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.