Skip to Content
.NET Common Language Runtime Unleashed
book

.NET Common Language Runtime Unleashed

by Kevin Burton
April 2002
Intermediate to advanced content levelIntermediate to advanced
1024 pages
23h 26m
English
Sams
Content preview from .NET Common Language Runtime Unleashed

System.Drawing

This namespace provides classes and support for construction and display of arbitrary graphical objects.

A few examples of using classes in this namespace can be found in the ImageProcessing application in Appendix A,“C# Basics.”

You can also find a simple example in the Scribble directory. You create two cached variables:

private Graphics graphics = null;
private Point lastPoint;

When you click on a mouse button, the OnMouseDown event handler is called, the Graphics object is created, and the current point is saved.

graphics = CreateGraphics();
lastPoint = new Point(e.X, e.Y);

When the mouse button is released, the Graphics object is destroyed.

graphics.Dispose();
graphics = null;

The OnMouseMove handler is called and a ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Customizing the Microsoft® .NET Framework Common Language Runtime

Customizing the Microsoft® .NET Framework Common Language Runtime

Steven Pratschner

Publisher Resources

ISBN: 0672321246Purchase book