| Contents at a Glance | 5 |
|---|
| Contents | 7 |
|---|
| Foreword | 24 |
|---|
| About the Author | 26 |
|---|
| About the Technical Reviewer | 27 |
|---|
| Acknowledgments | 28 |
|---|
| Introduction | 29 |
|---|
| About This Book | 29 |
| Conventions Used in this Book | 34 |
| Windows Forms Fundamentals | 36 |
|---|
| User Interface Architecture | 37 |
| Classes and Objects | 38 |
| User Interface Classes in . NET | 43 |
| Interacting with a Control | 53 |
| Visual Studio | 57 |
| Designing Windows Forms Applications | 67 |
| The Last Word | 73 |
| Control Basics | 74 |
| The Windows Forms Package | 74 |
| The Control Class | 76 |
| Position and Size | 81 |
| Color | 85 |
| Fonts and Text | 88 |
| Focus and the Tab Sequence | 92 |
| Responding to the Mouse and Keyboard | 94 |
| Low- Level Members | 103 |
| The Last Word | 104 |
| Forms | 105 |
| The Form Class | 105 |
| Prebuilt Dialogs | 123 |
| Resizable Forms | 126 |
| Splitting Windows | 136 |
| The Last Word | 142 |
| The Classic Controls | 143 |
| The Classic Control Gallery | 143 |
| The Date Controls | 161 |
| Container Controls | 166 |
| AutoComplete | 169 |
| Drag- and- Drop | 171 |
| Extender Providers | 175 |
| The NotifyIcon | 177 |
| ActiveX Controls | 180 |
| The Last Word | 182 |
| Images and Resources | 183 |
| The Image Class | 183 |
| Resources | 190 |
| Localization | 198 |
| The Last Word | 203 |
| Lists and Trees | 204 |
| ListView Basics | 204 |
| More Advanced ListViews | 213 |
| TreeView Basics | 226 |
| More Advanced TreeViews | 235 |
| The Last Word | 241 |
| Drawing with GDI+ | 242 |
| Understanding GDI+ | 243 |
| Paint Sessions with GDI+ | 244 |
| The Graphics Class | 250 |
| More- Advanced GDI+ | 266 |
| Optimizing GDI+ Painting | 275 |
| Painting Windows Controls | 286 |
| The Last Word | 293 |
| Data Binding | 294 |
| Introducing Data Binding | 295 |
| Basic Data Binding | 297 |
| Common Data- Binding Scenarios | 307 |
| Data Binding Exposed | 319 |
| Binding to Custom Objects | 327 |
| Automatic Data Binding | 335 |
| Data- Aware Controls | 344 |
| The Last Word | 349 |
| Custom Controls | 350 |
|---|
| Custom Control Basics | 351 |
| Understanding Custom Controls | 351 |
| Control Projects | 356 |
| The Client Project | 360 |
| The GAC | 363 |
| The Last Word | 366 |
| User Controls | 367 |
| Understanding User Controls | 367 |
| The Progress User Control | 368 |
| The Bitmap Thumbnail Viewer | 374 |
| User Controls and Dynamic Interfaces | 385 |
| The Last Word | 393 |
| Derived Controls | 394 |
| Understanding Derived Controls | 394 |
| The ProjectTree Control | 397 |
| The DirectoryTree Control | 406 |
| Deriving Forms | 409 |
| The Last Word | 415 |
| Owner-Drawn Controls | 417 |
| Understanding Owner- Drawn Controls | 417 |
| Owner- Drawn Custom Controls | 431 |
| The Last Word | 451 |
| Design-Time Support for Custom Controls | 452 |
| Design- Time Basics | 452 |
| Code Serialization | 463 |
| Type Conversion | 473 |
| Type Editors | 488 |
| The Last Word | 500 |
| Modern Controls | 501 |
|---|
| Tool, Menu, and Status Strips | 502 |
| ToolStrip Basics | 502 |
| The StatusStrip and MenuStrip | 517 |
| ToolStrip Customization | 529 |
| Customizing the ToolStrip Rendering | 539 |
| The Last Word | 545 |
| The DataGridView | 546 |
| The DataGrid Legacy | 546 |
| Introducing the DataGridView | 547 |
| Bare- Bones Data- Binding | 550 |
| Formatting the DataGridView | 564 |
| Editing and Validation with the DataGridView | 583 |
| DataGridView Customization | 592 |
| The Last Word | 603 |
| Sound and Video | 604 |
| The SoundPlayer | 604 |
| Advanced Media with DirectShow | 608 |
| The Last Word | 616 |
| The WebBrowser | 617 |
| WebBrowser Basics | 617 |
| Blending Web and Windows Interfaces | 625 |
| The Last Word | 635 |
| Windows Forms Techniques | 636 |
|---|
| Validation and Masked Editing | 637 |
| Validating at the Right Time | 637 |
| Validation Events | 639 |
| The ErrorProvider | 643 |
| Regular Expressions | 647 |
| Custom Validation Components | 652 |
| Masked Ed
|