Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
The RadioButtons program in Chapter 12 shows how you can define a group of radio buttons and a check box to indicate the color of an ellipse and whether the ellipse is outlined or filled. Let's implement the same controls (plus a couple buttons) in a dialog box instead. The dialog box must have some provision that lets a program initialize the controls and also some way for an application to obtain the user's selections. You generally provide this interface through public properties of the dialog box form or, in some cases—particularly if you're in a hurry—through public fields.
This dialog box implements two public properties, named Color and Fill, that give another class access to the two items that the user sets using the dialog box.