Charles Petzold
Aimed at aspiring C# programmers of all levels, legendary Windows expert Charles Petzold's
Programming Windows with C# provides an extremely in-depth and intelligent tutorial to the APIs underpinning Microsoft's .NET Framework.
For a generation of programmers, Petzold's Programming Windows: The Definitive Guide to the Win32 API provided a virtual bible on how to get started with Windows development. This massive, handsomely bound hardcover edition attempts the same breadth of coverage for Microsoft's new C# language and the new .NET. With several examples clearly inspired by the earlier C title, this book demonstrates the author's keen eye for showing off and explaining the capabilities of low-level APIs to good effect.
The book first outlines basic "Hello World" examples for both a console and Windows Forms. Next, there's coverage of basic support classes (like points and rectangles) before turning toward using these structures in extensive sections on graphics programming. Petzold's traditional strengths as a computer author are in ample evidence here, with many short examples that exercise the capabilities of the new .NET APIs.
Veteran readers will recognize the basic shape of the early Win32 title in the organization of this (completely rewritten) C# version in the flow of topics from graphics, keyboard, mouse and timers, and the like. (One production note here is that the order of later chapters does jump around somewhat, circling back to graphics topics several times instead of presenting related APIs in order.)
The sections on graphics transforms and how to manipulate images are worthy of note. There's excellent coverage of the possibilities of working with text and fonts output in .NET. Nifty working samples for several types of clocks and shape-drawing demos will let you explore graphical APIs in detail.
Several chapters cover basic Windows Forms control programming with buttons, labels, and edit controls and then splitters, ListView, and TreeView controls. This volume closes out with references to files and streams, and math and string APIs. For any developer who wants to create state-of-the-art, "traditional" client-side software, this book is sure to be required reading for its in-depth look at graphics and other leading-edge .NET features. It proves once again that learning low-level APIs in detail is still a good way to learn Windows programming. --Richard Dragan
Topics covered: Overview of C# and .NET Windows programming fundamentals; a "Hello World" console application; C# language and object basics; a simple Windows Forms application (creating a main window and handling the paint events); basic .NET structures (including rectangles, points, and colors); text output and scrolling; exploring .NET system information; in-depth tutorial for GDI+ programming: pens, lines, rectangles, and polygons; keyboard processing (plus a custom class for caret processing); graphics transformations (including scaling, linear transforms with matrices); mouse processing (plus processing the mouse wheel); text and fonts (TrueType and OpenType fonts, antialiasing, measuring text); using timers; date and time APIs; a sample code for clocks; drawing and transforming images (displaying JPG and BMP files); simple animation; basic control programming (buttons, labels, scroll bars, and track bars); exploring Bezier curves and splines; menus (basic and custom); graphics paths and regions; clipping techniques; basic dialog box programming (modal and modeless forms); edit, list, and spin controls; font transforms and special effects, using toolbars and status bars, printing techniques (including print dialogs), splitter, TreeView, and ListView controls; programming with the clipboard, drag-and-drop support, reference sections on APIs for programming with files and streams, math functions, and strings.
1 Book for GUI developers
This book was a huge disappointment. It seems that Mr. Petzold thinks that GUI is all that Windows programmer should know about. Well, surely this is all you will learn from this book - almost 1300 pages on how to draw shapes and display various kinds of buttons.
On the other hand, people who really code GUIs for living might find this book very interesting as it contains a LOT of information on this topic.
I give it 3 stars for being comprehensive on one topic (GUI?). Took two away for the misleading title.
2 Great book on Windows Forms
This book provides a good, short introduction to C#. It was my first book on C#, and I did not feel like I needed another after reading it.
After those couple of chapters, it provides rather wordy coverage of Windows Forms and drawing graphics with .Net. The title should reflect this more clearly, in my opinion. The book does not talk about programming Windows in general (assemblies, threading, XML, etc.); it focuses solely on the graphical aspects, with some brief look at file I/O.
The coverage of Windows Forms and drawing is great, if a somewhat verbose.
3 WOW!
I'm not sure why I've seen so many good reviews for this book.......I see it as 1200+ pages of wasted paper. Microsoft recommends this book as study material for their exam? Rest assured..... this book doesn't cover anything but drawing pretty little circles, lines, text, and who could forget the cute little spiral, lol! This book contains a lot of useless information regarding the many, let me emphasize that MANYMANYMANY ways of drawing shapes.
Unless you plan on writing applications that produce arrays of wonderful shapes on your screen, this book is not for you! Take the time to head down to your local book store and review the content before wasting your money.
4 Programming with Windows Forms
If you carefully examine the list of "Topics Covered" given by Amazon, you will not be disappointed at how Petzold does it. No one covers what Petzold chooses to write about more thoroughly and clearly than Petzold. The book definitely assumes familiarity with a C-family language. What is absent is information that his previous "Programming Windows" books gave about the underlying Windows environment, and about interprocess communication. I suppose this is because you can simply link to other code without much work in the new framework. But he does not cover the structure of .NET; the word "Assembly" is not even in his reliable comprehensive index, nor is "Component" or "IComponent." Disposal of resources is only mentioned with regard to graphics objects. The book covers Windows Forms programming, very well, and that's all it is meant for. By all means get this book, but get other books for other purposes.
5 Excellent if you want to write GUIs with C#
While most C# books tend to focus on :
- basic C#
- XML
- ASP.NET
"Programming Windows with C# " simply teaches you all you should know about GUI programming with C#. It looks obvious, but try to find good references in this subject and you'd be disappointed.
Not most programmers can afford Visual Studio NET and also not all programmers want RAD tools. Actually what is great with C# is that it allows the programmer to do everything manually and avoid automatic code geration. While it could delay your work, it certainly make it clear. The Forms API for C# is considerably simpler compared to MFC or WIN32 API Programming. Java programmers like me will find it usefull because its similarities with the Swing API.
The author is an excellent technical writer and make everything easy to read. And like he said "I prefer to type the code by hand and then I will learn it".
If you aim to write Windows GUIs for C#, get this book. It is a complete reference in the subject. The author does not mention it, but there is an open source and free IDE for .NET development name Sharp Develop. I use it and so far I haven't gotten many troubles. Highly recommended.
6 Very good as its predecessors
I spent most of the time on Visual Basic but I consider this text the appropriate companion for Balena's book. This book explain wery well GDI+ and structure of windows forms and it is full of valuable information. It is true that all of this info are also contained in the MSDN collection but here all is well organized and written in a clear language. This book is not intended to learn C#, and maybe more appropriate title would be "Programming Windows with Windows.Forms". If you also know Visual Basic or the fundamental of OOP and want to begin to program .NET with C# this is the book for you. But if you lack good knowledge of OOP and want to learn C# language instead buy another book. Remember that in this book the syntax of C# is not covered in details.
7 This May Not Be What You Are Looking For.
As a professional programmer, this book was not what I was looking for. In reading the title, the absence of the word visual should have set off a light bulb. The author insists on doing everything manually, and does not tell the reader how to do things in the Visual Studio environment. In a professional environment where costs and deadlines are a major factor in development, there is no time for the gung-ho programming ideology of do it all your self. Also, the book spends allot of time on those basic low level programming topics that are not practical in a real business application development environment. Unless you are doing some really low level development, which requires you to draw your own graphics on the screen etc, many of the topics in this book are of little use. If you are doing such low level programming, which I don't believe C# is the ideal language for; you will need a more advanced and less advanced book to go along with this one. The book does not cover basic syntax in much depth. The book shows allot of code, but does not explain it from a beginner level in detail. However, the book is not a complete waste. It is awesome for introducing the rules and regulations of the C# language, the classes of the Windows Forms class library which replaces the MFC used in C++, and intermediate level basic code writing. Just don't buy the book thinking it is going to get you ready to dive into Visual C#; because it will not, and I don't believe the author intended it to. If you buy the book knowing what you're getting, you will be very happy. Don't let the inclusion of the word Windows in the title mislead you.
8 The Best .NET Programming Book
Petzold does it again. This is the definitive .NET programming book. The next logical step from the "Programming Windows" book that has become required reading for windows programmers. This book is required reading for the .NET Programmer.
9 Disappointing
Typically, I find Microsoft Press books on programming to be very good. This book is very disappointing. It's like someone simply took an internal microsoft specification and reformated. The MSDN is a better reference, and is searchable. This is the only Microsoft Press book I've ever purchased where I'm sorry I spent the money.
10 MCSD.NET,MCSE,MCDBA,MCSA and MCT
If you want to learn the art of programming with Windows Forms get Erik Brown book on WF. About this book it's not bad but I like the way that Mr.Erik explain things also he answers readers questions online.
Michael Youssef
Microsoft.NET Architect/Trainer
11 Good for what it covers...
I have been using C# for some time now but almost exclusively for web applications. I am now exploring Windows Forms programs using .net, so I began shopping for some books. I have always enjoyed Petzold books on Windows going back to the early days when we only had the Windows API. So I thought this would be THE book to have, i.e., the one book that will guide me through this period of getting up to speed on writing Forms programs. Sadly, it isn't that book, though it still is very worthwhile.
I was very surprised at what wasn't in the book- specifically, no mention of database access. You won't find database, SQL, Access, anywhere, even in the index. That was a major disappointment, because all of my Windows apps are doing just that - accessing a database. While the ASP.NET data access material more or less applies, there are differences in how it is done and I was hoping to have a text to help sort that out. This text does not do that.
Also omitted - anything to do with XML.
What this book does is the normal, core-Windows stuff such as drawing/painting, keyboard control, mouse, timers, fonts, images, bitmaps, menus, brushes, pens, etc. There is a very good chapter on printing. Also covered well is file input/output, drag and drop, various controls and so on.
It's a good library addition but I just wish there was some data access material in it to make it a great book.
I have found this book to be a good one to keep on the shelf
12 I was Petzold's student when started with C++ in 1992
The book is very high level. Very shallow book. Good for beginners who would say after reading it:"WHAW! it so marvelous!" not because they understand but more because they do not understand what had been tried to explained in this book. Not covering the depth of programming and concepts of C#. really does not worth time of reading it.
13 Only describes the obvious
The hard part about .Net is its interactions with windows. Eg. To know that if you want to print a page with controls you need to know how to use WM_Print explcitly. With Petzold's background I was hoping to find this deeper info.
Not so. It covers the pure .Net stuff pretty well and goes into all of the APIs in some depth, and it is probably the best book on the GUI side of .Net. But it does not address the hard stuff. (It is also a large book and a bit woffly.)
So for the real documentation you have to search the news groups etc...
(Be aware, only covers Windows/Forms API, not ASP, XML etc.)
14 Masterpiece!
Like his previous book on Windows 95, this book concentrates solidly on GUI programming, written by a master and presented masterfully.
I know full well that most programmers, most of the time, are writing applications that read and write data, which is one thing that this book doesn't cover. So in that sense I agree that the title is misleading. Nevertheless, what this book covers, the ins and outs of GUI programming, it does so very well that I'm hooked even though I didn't plan on writing Win Forms. The flow, organization, depth, detail, best coding practices, examples, and clarity are all top-notch. It's without a doubt one of the best computer books I have ever read.
I highly recommend this book to anyone who already has a good knowledge of C#, and either plans on programming Win Forms, or thinks he might want to.
15 /***** King of the hill *****/
If you are going to develope WINDOWS apps in CSharp, this book is a must.
Do not confuse this book with "Programming Windows 5th edition" -This is an all new publication written exclusively for the C# Language.
16 Covers WINDOWS FORMS only
This is an excellent book which covers Windows Forms, Microsft .NET's class library for creating the classic windows application. If you see bad reviews for this book, it's because people expected more than what the book promises. This book does an excellent job of covering user interface coding (UI). Note that yes, you can use the designer that comes with VS.net. But you get a wonderful understanding of the underlying code involved, and sooner or later, you will want to either change what the designer codes or create use your knowledge to create new controls.
17 He did it again
Well, I bought another book from Charles and he never ceases to impress me. Few people have such a thorough understanding of Windows and manipulating it. Every book he writes is first class, and history has repeated itself with this one. If you are serious about .NET development, buy this book.
18 Excellent book for Programming Microsoft Windows
A previous reviewer found the book "verbose" and complained about file handling being treated like a red-haired stepchild.
However, the purpose of this book is Programming Microsoft Windows using C#. The book is *not* a primer on the C# language. I suggest one of the O'Reilly books if you need a primer on the language itself.
For its stated purpose, the book is encyclopedic and masterful. However, to get the best value from this book follow the author's advice and throw away the accompanying CD. No real programmer ever learned a new language by reading about it and clicking on someone else's programmer. You must start at the beginning, read every page, and type in every sample yourself. It's time-consuming, but at the end you will have jump-started yourself to a point where you can really apply the language to Windows development.
Far from verbose, I was only disappointed that Petzold couldn't cover more graphics examples. Windows programming is a huge topic and 1200+ pages is just enough to cover the basics. But basics must be mastered before masters can be created.
19 Verbose
This book is OK, but could do with some more editing. Amazingly, for all it's verbage, I found the examples to be somewhat limited. A couple of them are not really "best practices" to boot.
20 Charles
I bought "Programming Windows with C#" for myself and "C# and Game Programming: A beginner's guide" for my son. I figured I should get a start on .Net and C# seemed like a good way to do it. I also figured that if I purchased a game programming book, that I could get my son involved in something more that playing games.
21 Much ado about....
Maybe it's just me, but as a practical reference I have not found this book to be worth much. Every time I go to it for information on something non-graphics related I find either nothing at all or very skimpy treatment -which is saying something in a book this size. I guess I should have know when I saw the way the XML documenting feature of C# was covered -which was a statement that it was great, but he was not going to cover it. Beyond that he seems to assume some prior knowledge of C++ or C. Hope this works for you if you buy it, it has not done much for me.
22 Check OReilly First
Petzold's Programming Windows was the bible of VC++ development, but doesn't compare the condensed detailed information you'll find in OReilly books. Microsoft Press books are always full of fluff. As a rule of thumb look at OReilly first before buying anything from Microsoft Press.
I don't work for OReilly. I have been a unix programmer for 15 years and a Microsoft programmer for about 3. The OReilly books are far superior in quality.
Steve
23 Great Introduction to C#
Petzold is a Win32 programming expert, and he brings that expertise to the world of C# and .Net in this clear, approachable and (fairly) comprehensive work. It's a great introduction to C# and to Windows Forms. I would have been happier with a bit less information on graphics programming, and a bit more on common challenges such as threading, but overall this is clearly a five-star work.
24 Essential for Windows Forms Development
This book has been my best guide in learning the ins and outs of Windows Forms programming. Petzold leaves out the designer in the IDE but for good reason: to give you an in depth understanding of the underlying framework. He does a thorough discussion, particulary with the features of the GDI+, and the examples are easy to understand and to adapt for your own experimentation. If you are learning and expecting to program in Windows Forms this book is an absolute must have.
25 Excellent
This is another definitive guide book to windows programmer. Petzold's writing style is so lucidly and easy-accessible that you can understand c# without much difficulty. This book focuses on GUI programming, just like his famous"programming windows", many people think its characteristic as a drawback, I don't agree with them, because for a windows programmer, especially for beginner, the most important is GUI programming. In this book petzold describes all of GUI programming with c# in detailed! I dislike some books which cover too many topics, but nothing is enough detailed.
26 Update of Standard "Programming Windows" Text
This is an excellent book for learning to "Program Windows Using C#". Note the title, PROGRAMMING WINDOWS WITH C#. If you are looking to program web applications, XML or databases, or for a C# reference, don't even consider this book. If you want a comprehensive reference, consider O'Reilly's "C# In A Nutshell", it has everything. The author has written identical books for Programming Windows using originally C, then C++ (they were classics). This current version is merely an update to the earlier texts implementing MS's new Visual C#. While I do agree with other reviewers that the text is somewhat simplistic, that is what I expected, and don't feel misled from the title.
Petzold's writing style is easy to understand, and follows methodically in describing the language features, class usage and applications to the .NET SYSTEM and FORMS NameSpaces and their usage. It does an excellent job at describing graphics GDI+ usage (find another current C# book that well documents the .MeasureText method or the lack of XOR drawing modes, I have found no others), images, form element, file handling, etc. I am about 2/3 of the way through (the reason for 4 stars), and am thoroughly satisfied with this work so far. Also, you can't beat the price, this one costs the same as Wrox, SAMS or Prentice-Hall books one fifth the size.
27 Frustrating! There are better choices.
This book seemed to be exactly what I wanted: 1200 pages of concentrated information about Windows Forms in C#. Unfortunately, it disappointed me by covering basics for pages and pages (like drawing circles) without getting to anything a developer can actually include in a professional application. Key topics weren't covered: data binding, MDI interfaces, real custom controls, etc. etc. etc. Afterwards, I stumbled across a much better book (although a little short): User Interfaces in C# (Macdonald), which has great ideas for implementing all these sorts of things. There are also some books dedicated just to GDI+ (I think Wrox has one) which would be better if you are looking for just that material.
28 Frustrating to Use as a Reference
Frequently, this book states: "I introduce this subject here, and expand on it in Chapters 8, 11, and 12. It can be very frustrating to use this book as a reference, in spite of the fact that the front cover features the words "Developer_Core Reference."
In my opinion, the programming examples are also fairly terse. Reminds me a little of reading Stroustrup (though it's not *that* bad).
I've been programming in C++ for years, and have generally enjoyed jumping over to C#. I have not enjoyed using this book. All the comments about "What I'll discuss here, and in more detail in Chapter 12" are just too wordy for me. I want to write code, not read someone else's personal musings.
29 Not the better book for C#
I don't like a lot this book. It is very good on how to work with GDI and with window forms, with a lot of samples, but it's very weak. In this book the C# doesn't appear a lot, in the most part are the Forms and GDI with samples that also can be written in any other language.
For me not a good book to introduce in the usage of C#.
30 Excellent reference!
This was the very first C# book I bought. It is an excellant place to start if you have Java or Visual Basic.Net experience. What I liked most about the book was how Mr. Petzold does not treat you like a complete idiot and explain certain programming concepts that are universal(Inheritence, for example)all over again. Another great thing about the book is that Mr. Petzold does not use any wizards or visual tools to draw forms and controls. Everything is hand coded. About the only thing I disliked was that there was absolutely no coverage of ADO.Net. I shouldn't have been so suprised being that the book was a "Windows" book. Overall, the first 4 to 5 chapters are enought to get you going with C#. I definately recommend this book!
31 Avoids important topics
I was expecting a lot from this book, but unfortunately it let me down. It feels like a port to C# of his classic Programming Windows. While it is a great reference for drawing graphics, it doesn't even touch some very important aspects of C# and .NET like data binding, MDI forms, or even data grids (the most complex and important control in the forms package) I get the feeling he talks about what he is comfortable and doesn't even mention other big topics. Normally a good strategy for an author, but not for a book that is meant to be a defining reference book.
32 Good reference but not as useful as desired
The book is excellently written but unfortunately, most of the content won't be of much use to 80% of the developers out there in their day to day work. The focus of the book is mostly on how Windows Forms works at a lower level than developers may find helpful. For example, a great deal of effort is spent on writing text directly to a form's body using pens. Effort is also spent drawing points, rectangles, arcs, etc. using pens and brushes. This would be useful if I were writing a graphing control or an image editor but for most business applications it isn't really applicable. For example, most applications deal with business data these days. Business data will usually be put on a form in a control like a list or tree view and interact with data on other controls. The data will never be written directly to the form.
Scattered throughout the book are numerous helpful explanations of the nuts and bolts of Windows Forms that will no doubt help solve tricky problems. The problem is that this information is scattered in passages that a typical developer may gloss over because they are about something the developer isn't interested in.
Overall, a good, well-written reference for those needing to know a lot about how windows forms work. But for day-to-day development of most business applications, the majority of the material is good to know but not critical. What is critical is unfortunately buried in places throughout the book, making it difficult to get to.
If you're working with low-level Windows Forms (doing graphics manipulation or writing your own controls at a low level), then the book is probably a must have. It's also good for its description of the Forms application structure (how forms apps are launched and operate). I'm sure I'll use it as a reference when I'm dealing with problems with keyboard and mouse access and other issues that don't directly relate to form controls.
33 Superb
Absolutely superb. This book takes you step-by-step through the process of creating GUI applications using raw C# programming alone -- NOT the VIsual Studio GUI tools that let you drag buttons onto forms and so forth. (You can do all the examples with a text editor and the command-line C# compiler.) Petzold's philosophy is not that you should not use these GUI tools, but rather you really should understand "how to do it by hand." I agree.
This book is also quite a good introduction to C#, although not as thorough as others. You'll learn most of the major aspects of the language.
The most exciting news about .NET itself is that building GUI's in C# is just as easy as it is in VB .NET, and both are easier than in VB 6.0 and infinitely easier than in the oldler C++. Components/classes build in any .NET lanugage are usable in any other .NET language just as completely as if they were written in that native, other language. You can freely intermix forms, buttons, and general classes among the .NET language family without losing any functionality.
The other exciting news that .NET completely replaces several gargantuan, overblown, outdated, and incomprehensible technologies (COM, in all its variations, the MS Foundation Classes, etc.). They are gone for good (although .NET pays due respect to accommodating them), all replaced by an infinitely simpler (and considerably better) .NET technology. I seldom praise Microsoft, but .NET is an effort long overdue and well-done. C# is the very center of .NET, and GUI's (for both apps and Web apps) are much of its currency. This book grounds you well.
34 Great book
I also recommend the Sybex book "Mastering Visual C# .NET" to go along with this book. That way you'll have everything you need.
35 Good Reference, bad tutorial
Depends on what your looking for. I find this book spend more words talking about what its going to talk about in future chapters than just talking about the topic of the current chapter. It gives a lot of in-depth reference to really how the language works, but if you are looking for an easy to follow tutorial to get up and running quickly, this is probably not the best book.
36 Good book, but only for .Net runtime, not solely Windows
I've shifted my platform from MFC to .Net, and I bought this book at the very first time. This book is still the bible of .Net programming and I think everyone should own one :) The color palette inside backcover is marvelous!
However, the .Net runtime itself does not cover all the Windows features (e.g. you don't have a folder browser dialog), and there are little about interoping with old APIs in this book. You still need the Programming Windows 5th edition and the low entropy MSDN to make your life easier.
37 Excellent information, a bit heavy around the waist
This book is a terrific introduction to C# and the Windows Forms section of .NET.
Petzold's approach is great on many levels. He codes all his controls and forms by hand, so you know what the underlying code behind the Visual Studio GUI editor does (and does this without deriding the GUI editor one bit!). For the most part, you learn C# and Windows Forms concurrently - there are a few sections where he presents material in what I would call a confusing order, however.
The weakest part of this book is its size. There is a lot of source code, which is good, and Petzold's explanations of new features are thorough, which is good too. But a large portion of the text is consumed by anecdotes and protracted explanations of simple features.
On the one hand, he assumes the readers are familiar with some sort of object-oriented programming (although you need not be an expert). But on the other hand, several concepts are explained so exhaustively (transforms, fonts, some graphics) that I found myself skipping page after page because I already understood the topic and was ready to move on.
I still highly recommend this book. I just wish they had cut the size down and made it a paperback!
38 Excellent book...
...
I have not finished reading it yet, but so far I am very happy with my ... purchase. I half expected it to be Petzold's Windows 95 classic ported to c#, but it goes much further than that.
It is a big book, I have trouble reading it in bed 'cos it nearly asphyxiates me due to the weight on my chest.
Recommended for anyone who is familiar with C\C++ and wants to migrate to C#. I would not recommend that this book is your first exposure to programming in general (or OO methods) but you knew that already.
My best description would be that C# and this book makes Windows programming 'accessible' (without using a RAD language like VB).
39 Good Book for Microsoft Veteran programmers
This book is written by author charles petzold who wrote many books on windows. And it covers well all topics. Its good start for people who are planning to shift into C# programming.
40 Turned Light Bulb On for me!
I had trudged through the entire book Inside C# without truly understanding the language. After reading just the first Chapter of Petzold I have a firm grasp of C# classes, methods, properties, plus all-important scope. Code samples clearly demonstrated basic syntax and use of the language. His carefully crafted explanations and examples flowed smoothly and precisely building on material he had just presented. They lead me to a "light bulb on", "forehead slapping" true understanding of all the major concepts. Both his code and explanations were elegant. This is a real textbook not a first draft rushed into print. There were also excellent contrasts presented from the perspectives of C, java and C++ programmers.
I don't know if the rest of the book can compare to the first Chapter. But I feel I've already gotten my money's worth and learned something I can use. That makes it an instant classic as far as I'm concerned. This one is a keeper. Like classic BMW's, don't expect to find a good used one. The onIy problem is that now I expect much more from other technical writers and will surely be disappointed. Five Stars.
41 Petzold a winner
Sometimes you win, sometimes you loose.
I bought Petzold, "Programming Windows with C#" and Pappas & Murray, "C# for Windows Programming" at roughly the same time. Petzold's book is long and thorough. It took me about 6 days of working through the book, but when I was done (in April), I had what I needed to write a small (~10000 lines, 1/2 of it GUI code out of the Visual Studio .NET GUI editor) commercial application that just hit the shelves two weeks ago (in July). In addition to a thorough introduction to Windows Forms programming, the book introduced readers to a variety of other .NET framework classes that I actually ended up using. Information was accurate (with a few exceptions due to changes between the betas and the final .NET code) and well organized. Petzold was careful to warn readers about techniques that might look appealing but would cause trouble later, and explained why they might cause trouble.
So now that I can breath again, I thought I'd work through the Pappas & Murray book. What a joke. These guys must have been working under an unrealistic deadline, because I've never seen a book padded with so much fluff and so little usable content. At least two of the examples won't work as published, the descriptions of the event handlers are 23 pages of repetitive cut and paste that could have been cut down to 5 pages with a little thought, enumeration values for three or four MessageBox parameters were munged together in one table so that you couldn't tell which values to use with which parameters, and so on and so on. Code was sloppy - techniques they used that worked for their small examples would be dangerous if used generally in larger programs. This book is worse than just "beginner", it will lead beginners wrong.
I won with Petzold's book, and lost with Pappas & Murry's. Fortunately I read Petzold's when it counted.
42 One of the best ...
This is one of the best books for beginner to intermedaite .NET windows developers. Windows basic concepts are well explained. I wonder if Petzold is coming with second advanced version. Topics are missing such as Multithrading, Advanced Windows development etc.
Author has divided book into three categories - The Basics, Graphics, and The User Interface. You can pretty much guess. Well explained chapters on Lines, curves, text, fonts, printing, images, curves, brushes, pens, mouse keyboards, timers, dialog boxes, menus, tree and list views.
Missting many windows (forms) featuers though.
Worth. Give it a try.
43 Excellent but a Misleading Title
Programming Microsoft Windows with C#: A Core Reference
As expected, book is an excellent work but title is misleading. I've read the entire book and this is what I found:
1. Excellent book for beginners to write Windows programming with simple Windows controls including brushes, pens, text and fonts, keyboard and mouse events, times, scroll bars, menus, dialog boxes, toolbars and status bars, tree view, list view and printing.
2. Book is well written in a tutorail way, easy to understand.
3. Not much for an advanced developer. If you're looking for some advanced stuff, you may be disappointed.
Overall a must have for .NET beginners and intermediate developers.
44 Petzold in Top Form
This book is the best way to learn the basics of C# and Client .NET Framework. Petzold remains THE Master at teaching Windows Application Developement. Highly readable as well as authoritative.
45 It's Right
I've read the reviews: mostly good, some bad. Know what really matters? It's right. The code works, and there's no typos.
So what if Petzold doesn't use the IDE? What he wrote is right. The text is right and the code is right.
If you want to go nuts debugging code written by some hack, buy someone else's book.
If you want code that works, and text that makes sense, buy Petzold.
46 Lacking depth
I have to agree with the other reviews who critisize this book.
I for one found it lacked depth and didn't cover a lot of
material that I wanted to know about. There's no mention
for example of how to use the toolbar, and there are some
trick one needs to know to get the toolbar to work effectively.
There is no mention of windows with child windows, eg the toplevel property.
There isn't much, if any, discussion on
on to organise a windows program using C#, especially when
dealing with multiple windows.
Overall, good for a beginner but as I said it lacks depth for the
professional. If you any significant amount of programming
you will soon outgrow this book.
47 Great GDI and Windows Forms book
I don't see why some reviewers of this book continually state that this book is a C# book. I'm talking both good reviews and bad reviews here. Unfortunately, many people see remarks about what a great C# book it is, purchase the book, find out it contains exactly 40 pages of C# information and then return here to slam the book. It's unfair to the author and unfair to customers.
Let's talk about what this book IS. This book is the very best book on the market for writing Windows applications in C#. The author focuses on the IO, Drawing and Windows Forms namespaces and types and in the end produces the best book of its kind currently available.
The key to remember when deciding on this book is that there's a reason that both Tom Archer and Charles Petzold write for MS Press. Mr Archer focuses on C# and Mr Petzold on what to do once you've learned the language. A hint might also be gathered via the fact that this site sells both as a combination deal!
In summary, I own both books (as well as Jeffrey Richter's fine internals book) and rarely am ever at a loss for answers in my .NET development (something I do 10 hours a day).
48 Great GDI and Windows Forms book
I don't see why some reviewers of this book continually state that this book is a C# book. I'm talking both good reviews and bad reviews here. Unfortunately, many people see remarks about what a great C# book it is, purchase the book, find out it contains exactly 40 pages of C# information and then return here to slam the book. It's unfair to the author and unfair to customers.
Let's talk about what this book IS. This book is the very best book on the market for writing Windows applications in C#. The author focuses on the IO, Drawing and Windows Forms namespaces and types and in the end produces the best book of its kind currently available.
The key to remember when deciding on this book is that there's a reason that both Tom Archer and Charles Petzold write for MS Press. Mr Archer focuses on C# and Mr Petzold on what to do once you've learned the language. A hint might also be gathered via the fact that this site sells both as a combination deal!
In summary, I own both books (as well as Jeffrey Richter's fine internals book) and rarely am ever at a loss for answers in my .NET development (something I do 10 hours a day).
49 Great GDI and Windows Forms book
I don't see why some reviewers of this book continually state that this book is a C# book. I'm talking both good reviews and bad reviews here. Unfortunately, many people see remarks about what a great C# book it is, purchase the book, find out it contains exactly 40 pages of C# information and then return here to slam the book. It's unfair to the author and unfair to customers.
Let's talk about what this book IS. This book is the very best book on the market for writing Windows applications in C#. The author focuses on the IO, Drawing and Windows Forms namespaces and types and in the end produces the best book of its kind currently available.
The key to remember when deciding on this book is that there's a reason that both Tom Archer and Charles Petzold write for MS Press. Mr Archer focuses on C# and Mr Petzold on what to do once you've learned the language. A hint might also be gathered via the fact that this site sells both as a combination deal!
In summary, I own both books (as well as Jeffrey Richter's fine internals book) and rarely am ever at a loss for answers in my .NET development (something I do 10 hours a day).
50 "Programming Rich Clients for Windows" -- better title?
Another reviewer complained that this book was not about programming Windows. This is not true -- only the title is a bit misleading. This book explains how to program very Windows-specific things, such as Windows Forms and GDI+. It is mainly for writing rich-client applications, which may become more popular now.
Anyone who has read Petzold's previous books will see it is exactly the same focus. It is an excellent book, as usual, and the few things which are incorrect/out of date are corrected on his website. Programmers who have been working with Windows for many years all know that Petzold's books are a kind of standard.
51 Makes a good door stop.
I see that everyone just loves this book but I can not see why. I bought it because of the Petzold name but it sure did not live up to my expecations. It seems to rehash the same things that were part of the his C book. If you want to draw pretty fonts all over the place this book is for you otherwise find another book.
52 Buy it if you are serious about c#
It is a great reference book. I have bought a lot of them and this one is the one I take home from work. Enough said.
53 A must for the serious .NET Windows Forms programmer
This is an excellent book. It's not a language tutorial nor a how-to cookbook on creating generic programs using the various wizards. This book is a clear and thorough guide to utilizing the object-oriented (finally!) features of the .Net Windows Forms library. Some of the writers of the negative reviews below seem to have been expecting something else. Mr. Petzold carries on his great tradition of illuminating the otherwise vast and murky landscape of programming Windows. This book will certainly be the reference of choice for anyone targetting this aspect of the .NET platform. His examples are short and to the point. Sure, you may not write a program that just draws lines, curves and splines, but when you need to utilize that portion of the library that he is discussing, you'll definately appreciate his brevity and sophistication in covering these topics. Of course, much of the material is also available in the Microsoft documentation. However, this documentation is usually terse and sometimes incomplete. Having someone with Mr. Petzold's experience and skill guiding you is far more pleasurable and educational. If you're familiar with his Programming Windows book, you'll know exactly what you're getting. If not, definately make the investment in this book. It will be a most valuable reference.
54 This is a great book on C#
This book is every bit as good as Charles' books on Programming for Windows.
I highly recommend it if you are interested in learning C#.
55 Petzold is stuck in a time-warp
You really need to take a close look at this book before you buy it. I think a lot of innocent people are going to lose some serious money, just because of the "Petzold aura".
Petzold's style hasn't changed a whit... even though he has migrated his code from C to C#, it's still the exact same stuff. Entire chapters dedicated to drawing curvey lines, and hand-painting fonts on a screen. You will not learn the C# language either... I repeat, this is not a tutorial.
I've read both Programming Windows 3.1 and Programming Windows 95. They taught me the structure of Windows programming fine, but in a decade of programming, I've never done a thing that even closely resembles what Petzold does in his books.
Programming is about forms, data, transformation, and storage, and there is nothing here along these lines. Please take one person's advice, and visit a bookstore before you take this plunge.
56 Best resource I've found for C#
Petzold is a literate writer who effectively uses information (and anecdotal material) from the history of Windows programming, and the broader history of computer programming, to put his technical examples in a rich context.
I find his exposition of C# grounded in practical problem-solving with .Net's Forms and Controls extremely useful. The kinds of problems he poses and solves (with source code in the text and on the accompanying cd) are the types of problems that I face creating user interfaces and interacting with Windows system services.
The book is, as other reviewers commented, focused purely on client-side issues, but I disagree with another reviewer who felt it didn't cover COM : He does mention and show examples of using the InterOp facilities, and, I believe, that since .Net is designed to replace both COM and ActiveX, this is very appropriate. There are a lot of other resources for COM and COM+.
For myself I would rather learn a language bottom-up through studying and using concrete code examples that accomplish real-world tasks than read abstract books on the structure of the language, etc. Perhaps if you are a "top-down" learner who prefers to start with a very formal language definition and Backus-Naur diagrams and then implement some algorithms, and then, finally, get around to implementing the algorithm in a specific OS environment, this may not be the right book for you to start with on .Net.
I have other books by Troelsen, Gunnerson, and Liberty, and they are useful also, but Petzold's book is the one I keep coming back to and re-reading over and over.
The clear technical writing style that Petzold has achieved is, imho, very rare these days. I have the wonderful sense reading the book that I am sitting across a table from a wise friend who is gently and patiently guiding me forward through a complex technical subject.
57 if you didn't like MFC, skip this
Petzold is a great writer/teacher, but I agree with his previous assessment that MFC is clumsy, best to use win32 API directly with C++, so why bother with a reduced basterd language like C#, beats me. He's a great teacher if you want to learn thouroughly, but C#, give me a break. read his 5th edition windows book (and some C++ books), it's all you need. also Shildt is probably more efficient for learning faster. my humble opinion.
58 This Is the One...
If you are looking for coverage on the features of Visual Studio.NET, this isn't the book to get.
However, if you want to learn about Windows Forms programming, this book is your last stop.
Get it, because it's excellent.
59 An instant classic for .net programmers
This is the BEST book on the market covering windows forms, gdi+ and .net application programming!!! I'm not kidding and have no relationship with the author or publishers.
Every application programmer developing in .net will want to have this next to them. This includes those programming in VB.net.
This is not a book about c#. It is about developing applications and since the API calls are identical across all .net languages you can use this as a reference to program in any of them.
All the nitty gritty details that you need to draw, print, size fonts, write your own controls etc are here. The demo programs are brilliant. Petzold creates tiny demos that show off each section of the API and let you explore the options. Then he shows you every possible alternative way to get the same effect.
The book is very large (1290 pages), but it is worth reading all the way through. It explains, elucidates and, dare I say it, entertains.
Finally a .net book that goes beyond mere syntax and repetition of the msdn reference.
60 Very good book
After being frustrated with MFC, this book has given me a hope. Windows programming with C# is much simpler than MFC and API programming. It is different, too. The author points out the diffences as well as introduce new concepts like override and delegate that are new in C#. This book teaches you the basics of GDI and Windows Classes. I am also glad he shows different ways to handle events in chapter 2. Sample codes are readable, simple, and straight to the pint. As other reviewers say, this book only teaches Windows programming and does not cover any of web, XML, database, or Microsoft enterprise applications.
61 Six stars for this book
This book overcames my expectancy. The author is very clear in each detail and explains everything you need to know about GDI+
and Windows Forms.
I guess this is the right book to learn windows programming using C#.
62 Great book, so-so index
Like a visit to a highly paid doctor - you know you are in the hands of an expert. Like driving a car you _know_ will become a classic one.
My only problem: The index does not do justice to this book! For example, there are more than a hundred little programs in the book. All are named, and all are referenced in the text. The index, however, does not mention them.
63 Very GUI oriented
I picked up this book primarily to advance my C# skills. As I have not programmed a standard EXE type UI in ages, I doubt I will get to use it for much more. I tell you this, as there is a possibility my review my be a bit clouded due to my programming of web apps. As I have given a great rating, I hope my neutrality on the content comes through.
Opening the front cover, you can instantly see the focus of the book (if you did not figure out by the title). The inside cover is a list of the system class that relate to typical window UI applications. The back cover also contains information for UI apps, namely the colors you can set Windows Forms too.
The first chapter deals with the basics of C#. The chapter covers C# from the perspective of one with programming experience. As this is not a beginner's book, this is not a bad thing. This introduction continues through the next couple of chapters, which cover the basics of Windows Forms and their structure.
From this point on, you learn in bite size chunks, the workings of every part of a Windows Forms application, including text, drawing, IO, time, images and menus.
This is not a book for the casual reader. The entire tome weighs in at over 1200 pages of content, and Microsoft has not added thunk by using overly large fonts and huge graphics.
My favorite part of the book is the appendices. I especially enjoyed learning more about file IO and strings. I am also very fond of the fact that Microsoft did not take the yearbook approach to this work, like Wrox. The consistency of the material is excellent compared to the competition, and having a single author may be the most important point.
The biggest negative here is the title. When I think of Programming Windows, I am not necessarily thinking of GUI. I am sure my focus on web apps has something to do with this, but I have also poked around in the Windows API prior to .NET. While this book covers some of the Framework under the hood, it is mostly aimed at the UI.
Fortunately, the material is compelling enough to not knock off points for the misleading title. If you read the back cover, you will understand that this is not a API style book going in, so it is not that bad.
64 Just what I expected...
I had forgotten how good it is to read text written by a really good writer. He starts with the basics, covering enough to get you going, and moves into more advanced topics for developing Windows Forms applications, including things like drawing and all of the standard widget control you would expect in a book from Charles Petzold. Quibbles? Some lax editing (for instance, on Page 12, it says date when I am pretty sure he meant data) but as a writer myself, I know how difficult it is to get a "perfect" book out the door. That said, I am thrilled to have this book, and have read a good bit of it, and will continue to read it to the end (though given the length, it may take a while!).
65 Destined to become a classic
This is one of the most carefully constructed books on programming that I've ever read. The book builds a doggedly focused exposition of .NET Windows Forms from the ground up, and within that subject, there is very little missing here. Further, any diversions are relegated to three superbly organized appendices on Files and Streams, math functions, and string handling, three areas which rich client windows programmers have to have good mastery of anyhow. When I say that Petzold builds his subject from the ground up, I mean that the book can and should be read like "War and Peace, " from beginning to end without skipping anything. Even if you think you understand the basics, I'd be very surprised if you didn't gain important insights you might have missed before, even from the early and elementary chapters. Virtually nothing is presupposed and your knowledge is build up, block by block. After studying this book, you will understand exactly what is happening in a .NET Windows Forms application. Other books take a shotgun approach, throwing stuff at you that may work, but without providing the background to understand what is happening beneath the sheets. Petzold does not let Visual C# generate code automatically. Visual Studio provides a lot of visual tools and wizards for quickly designing dialog box layouts and generating code frameworks, but Petzold wants you to understand what is really going on, so everything is hand-coded in this book. This can either be a warning to you, or an invitation to those who want a deep understanding of how a Windows Form is really put together. I'd say, do it Petzold's way first, and after you've mastered the foundations of Windows Forms, use the visual tools to save time when your now superior perspective can do so without running the risk of not understanding something the visual tools did that isn't quite working right and you don't have the depth of understanding to quickly zero in on the cause.
There is virtually nothing in this book that is not focused on .NET Windows Forms using C#. Mercifully, VB.NET isn't even mentioned. Also, you won't find diversionary chapters on ADO.NET or ASP.NET. The book treats Windows Forms basics (from the classic "Hello, World", through essential data structures and basic text output), and then alternates the chapters between topics on graphics (GDI+) and user interface elements (mouse, keyboard, timers, buttons, menus, toolbars, etc.). GDI+ is an enhancement to the old GDI and the book contains uncompromising chapters on such graphical topics as Bezier curves and other splines, including all the necessary mathematical background. In the chapter on Pages and Transforms, he presents* all the mathematical background necessary to perform the linear transformations needed to utilize the GDI+ graphical transforms. This is what I mean about uncompromising. He doesn't avoid topics in the .NET Windows Forms classes because they might require a little college algebra that most of us have probably forgotten. He just dives right in and presents everything necessary to come to grips with the deepest .NET classes in Windows Forms. About the only subject he doesn't treat is Image Color Management, a topic so vast it really deserves a book of its own (although "Windows 2000 Graphics API Black Book" has an excellent chapter on the Win32 API).
With such an exhaustive treatment of his subject matter, you might think this book might be pretty dry reading. Not true. Petzold writes with supreme confidence and wry wit, never cloying, always with just the right touch. This book is fun reading, his enthusiasm for his subject matter always in evidence, even when he's exhaustively presenting the methods of a class or an enumeration. You can tell he is having a ball.
There are lots of tables and code in the book. The code is available on an included CD. A minor problem I had is that sometimes the Beta 2 produced a bunch of "System.Byte not defined in the workspace" errors. If this happens to you, just choose Yes when it asks if you want to go ahead anyhow. The applications still work.
His examples are short and are easily typed in by hand, something Petzold recommends anyhow. The way I worked with this book was to embellish little programs of my own anyhow, trying out the facilities he was expositing within my own framework. I probably learned even more taking this approach rather than using his examples literally.
So overall, it is hard to imagine that this book could ever be surpassed. This book deservers an extra rosette, beyond the five stars for those extremely rare computer books that are destined to become a classic teaching a whole generation of programmers.
66 Be better called Programming Windows GUI with C# :)
This book is for neither .NET/C# programming language nor Windows Operating System. It focuses on Windows GUI programming.
It only spends about 40 pages on C# language basics, and also, it never mentions COM/COM+, which are very important features for Windows platform.
This is the best reference book for windows forms and .Net GDI+ programming. It spends 1200+ pages to introduce all those Graphic and UI stuff in a C# way. If you are a UI programmer, this book is nothing but a must buy! It includes everything you need to know about .NET/C# GUI programming.
But, if what you are looking for is some C# language reference, please refer to C# Primer: A Practical Approach by Stanley B. Lippman or Progamming C#. If what you want is a detail look into .NET platform/CLR, refer to Compiling for the .NET Common Language Runtime.
67 another excellent book
As with previous Petzold's Programming Windows books, this book tells you the nuts and bolts of windows programming, in C#. In details explained real well. I especially enjoy the little pieces of history as introduction in each chapter. Petzold even give you a brief math lesson when explaining Bezier curves. But this book does not give you a real-world-app, but the knowledge of details that make you build one. The appendix of math and string class will be helpful for anyone doing real programming.
68 Great Book, Again!!
Like all of his earlier books, this is the one you must have if C# is the language and Windows is the platform.