Buttons Checkboxes Radio Buttons Panels Group Boxes Immediate Solutions: All About Buttons Setting a Button's Caption Setting a Button's Foreground and Background Color Setting Button Fonts Handling Button Clicks Imitating Control Arrays Resetting the Focus after a Button Click Giving Buttons and Other Controls Access Characters Setting Button Tab Order Disabling Buttons Showing and Hiding Buttons Resizing and Moving Buttons from Code Adding a Picture to a Button Adding Buttons at Run Time Passing Buttons to Procedures Handling Button Releases Using the Checkbox Class Creating Checkboxes Getting a Checkbox's State Setting a Checkbox's State Creating Three-State Checkboxes Using the RadioButton Class Creating Radio Buttons Getting a Radio Button's State Setting a Radio Button's State Creating Toggle Buttons Using the Panel Class Creating Panels Adding Controls to Panels in Code Using the GroupBox Class Creating Group Boxes Adding Controls to Group Boxes in Code
In this chapter, we're going to look at what are arguably the most popular controls in Visual Basic: buttons. This includes buttons, checkboxes, and radio buttons. I'll also take a look at two grouping controls—panels and group controls. You use panels and group controls to enclose other controls, and that's particularly important with controls such as radio buttons, which operate in groups. I'll start with an overview of buttons.