Chapter 8: Graphics, Multimedia, and Printing


Overview

Graphics, video, sound, and printing are the hallmarks of a traditional rich client on the Microsoft Windows operating system. When it comes to multimedia, the Microsoft .NET Framework delivers a compromise, providing support for some of these features, while ignoring others. For example, you'll find a sophisticated set of tools for two-dimensional drawing and event-based printing with GDI+ and the types in the System.Drawing namespaces. These classes wrap the native Graphics Device Interface (GDI) functions in the Windows API, and they make it much easier to draw complex shapes , work with coordinates and transforms, and process images. On the other hand, if you want to play a sound recording, show a video file, or get information about the current print jobs, you'll need to look beyond the .NET Framework.

This chapter presents recipes that show you how to use built-in .NET features and, where necessary, native Win32 libraries via P/Invoke or COM interop. Some of the techniques you'll see include

  • Recipes to find and use installed fonts (recipe 8.1), draw scrollable images (recipe 8.5) and thumbnails (recipe 8.8), as well as perform a screen capture using the Win32 API (recipe 8.6).

  • Approaches for working with owner-drawn custom controls (recipes 8.3 and 8.4) and manipulating graphical objects on the screen (recipes 8.2 and 8.7).

  • Playing audio and video, including WAV, MP3, and MPEG files, using the Quartz type library included with Windows Media Player (recipes 8.9, 8.10, and 8.11).

  • Printing both simple and complex documents (recipes 8.13 and 8.14), wrapping text (recipe 8.15), creating a print preview (recipe 8.16), and retrieving information about printers (recipe 8.12) and print queues using WMI (recipe 8.17).




C# Programmer[ap]s Cookbook
C# Programmer[ap]s Cookbook
ISBN: 735619301
EAN: N/A
Year: 2006
Pages: 266

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