Chapter 15: Advanced Controls

Chapter 15
Advanced Controls
  • Using Up-Down Controls
  • Using the ProgressBar Control
  • Using the PictureBox Control
  • Using the ImageList Control
  • Using the RichTextBox Control
  • Using TabControl Controls
  • Using the MonthCalendar Control
  • Using the DateTimePicker Control
  • Managing the Position and Size of Controls

In this chapter, we’ll look at several more controls that are part of the Microsoft Windows Forms namespace. Although the chapter is titled “Advanced Controls,” these controls aren’t difficult to use or understand. On the contrary, the controls in this chapter enable you to add a large amount of functionality—often with just a few lines of code. For example, the MonthCalendar and DateTimePicker controls provide rich user interfaces for selecting the time and date but require almost no coding on your part.

We’ll start by looking at the up-down controls and the ProgressBar control. The up-down controls come in two flavors: the NumericUpDown control works with numeric values, whereas the DomainUpDown control can be used to iterate and select almost any collection of objects. The ProgressBar control provides visual feedback to the user regarding the status of a task.

Next we’ll examine the PictureBox and ImageList controls, which are used to work with images, and the RichTextBox control, which provides support for editing formatted text. We’ll also look at the TabControl control, which helps you organize groups of controls to conserve space in your application’s forms, and we’ll discuss the MonthCalendar and DateTimePicker controls.

The chapter concludes with a discussion of anchoring and docking—two features that are exposed by all controls and that make it easy to position and dynamically resize controls in forms that are resizable.



Part III: Programming Windows Forms