Overview
“Look it up in Petzold” remains the last word on Windows development. In this .NET-ready Windows programming guide, the best-selling author shows you how to get the most out of Windows Forms—the next-generation Windows programming class library. You’ll discover how to use C# to create dynamic user interfaces and graphical outputs for Windows applications. With dozens of examples of client applications to illustrate common techniques and plenty of no-nonsense advice on best programming practices, you’ll be C# sharp in no time. Topics covered in this guide include:
- A tour of C#
- Windows Forms
- Essential structures
- An exercise in text output
- Lines, curves, and area fills
- Tapping into the keyboard
- Pages and transforms
- Taming the mouse
- Text and fonts
- The timer and time
- Images and bitmaps
- Buttons, labels, and scrolls
- Béziers and other splines
- Menus
- Paths, regions, and clipping
- Dialog boxes
- Brushes and pens
- Edit, list, and spin controls
- Font fun
- Toolbars and status bars
- Printing
- Tree view and List view
- Metafiles
- Clip, drag, and drop
INCLUDED ON CD-ROM:
* Sample source code for all the examples presented in the book
A Note Regarding the CD or DVD
The print version of this book ships with a CD or DVD. For those customers purchasing one of the digital formats in which this book is available, we are pleased to offer the CD/DVD content as a free download via O'Reilly Media's Digital Distribution services. To download this content, please visit O'Reilly's web site, search for the title of this book to find its catalog page, and click on the link below the cover image (Examples, Companion Content, or Practice Files). Note that while we provide as much of the media content as we are able via free download, we are sometimes limited by licensing restrictions. Please direct any questions or concerns to [email protected].
Editorials
From Barnes & Noble
The Barnes & Noble ReviewC# and .NET were made for each other. So, it seems, were Windows and Charles Petzold. Petzold's Programming Windows, first published in 1988 and now in its fifth edition, has been the most authoritative guide to Windows development for one generation of programmers after another. Now, it's joined by a new classic: his new Programming Microsoft Windows with C#.
Web apps get the hype nowadays; Petzold focuses elsewhere: on the powerful .NET Windows Forms tools that enable state-of-the-art Windows development. Whether you're building traditional standalone "client" apps or front-ends for distributed systems, he guides you through the "Windows" side of .NET with unprecedented depth and insight.
This isn't "Harry Potter" coding: No wizards allowed. Petzold doesn't even use the Windows Forms Designer: It can take you only so far, he says, and if you don't understand how to manually code your controls, you'll be up a creek without a paddle. Prepare to get your hands dirty.
Petzold begins with the basics of Windows Forms, the essential data types required to program graphical applications, and the basics of text output. Then, he moves on to the two large collections of .NET framework classes -- user and graphics -- that encompass the "visual" aspects of Windows development. While these can be traced all the way back to Windows 1.0, they've been refined again -- and, of course, C# and .NET change how you get at them.
On the "graphics" side of the house, the book's systematic coverage includes lines, curves, fills, pages, transforms, text, fonts, images, bitmaps, Bézier curves, paths, regions, clipping, brushes, pens, fonts, printing, and vector graphic metafiles. On the UI side, he starts with mouse and keyboard programming (showing how to provide the oft-neglected keyboard equivalents, and raising a few thorny issues that seem to require recourse to the old Win32 API). Next, he covers all the GUI elements of a modern Windows application: buttons, labels, scrolling, dialog boxes, edit, list, and spin boxes, toolbars, status bars, tree views, list views, clipboards, and more.
One more note: Whether you're writing Windows or web apps, you'll often find yourself dealing with file I/O, floating-point mathematics, and string manipulation. Each are significantly changed in the C#/.NET environment. Failing to find reliable guides to them, Petzold has written his own and included them as appendices.
As Windows programming continues to evolve, one thing fortunately remains constant: Charles Petzold's still there to explain it to us -- brilliantly. (Bill Camarda)
Bill Camarda is a consultant, writer, and web/multimedia content developer with nearly 20 years' experience in helping technology companies deploy and market advanced software, computing, and networking products and services. He served for nearly ten years as vice president of a New Jerseybased marketing company, where he supervised a wide range of graphics and web design projects. His 15 books include Special Edition Using Word 2000 and Upgrading & Fixing Networks For Dummies®, Second Edition.