Here we continue our Windows Form
s presentation. We start with menus, which present users with logically organized commands (or options). We show how to create menus in the Windows Form
s designer. We discuss how to input and display dates and times using the MonthCalendar
and DateTimePicker
controls. We also introduce LinkLabel
s that can hyperlink to a file on the current machine or a web page, simply by clicking the mouse.
We demonstrate how to manipulate lists of values via a ListBox
and ListView
and how to combine several checkboxes in a CheckedListBox
. We also create drop-down lists using ComboBox
es and display data hierarchically with a TreeView
control. You’ll learn two other important GUI elements—tab controls and multiple document interface (MDI) windows. These components enable you to create real-world programs with sophisticated GUIs. You’ll use visual inheritance to build upon an existing GUI.
Visual Studio provides many GUI components, several of which are discussed in this (and the previous) chapter. You also can design custom controls and add them to the ToolBox, as we demonstrate in this chapter’s last example. The techniques presented here form the groundwork for creating more substantial GUIs and custom controls.