Chapter 3. Windows Applications
.NET 2.0 adds a host of rich controls that make it easier than ever to build Windows clients and to cut down on coding. Among the new controls we will examine in this chapter are those that provide improved menus and tool strips, masked edit controls, and a built-in web browser control. You’ll also learn how to put ClickOnce deployment, a new Microsoft technology for deploying Windows clients, to work.
Add Tool Strips to Your Application
.NET 2.0 introduces a new ToolStrip
control that provides a modern Office look for toolbars,
handles Windows themes, and provides access through the toolbar to a
plethora of controls, including buttons, lists, menus, labels, and
more.
How do I do that?
To get started, open a new Windows application and call it
Toolbars
. Make sure the Toolbox is
open and drag a ToolStripContainer
control onto your form. Click the ToolStripContainer
smart tag for a list of ToolStripContainer
tasks. The ToolStripContainer
control allows you to
specify that the panel be visible at the top, bottom, left, or right
of the application Window, as shown in Figure 3-1. Choose top
only.
Note
The ToolStrip control helps you create modern menus with zero coding..
Drag a ToolStrip
control from
the Toolbox onto the ToolStripContainer
control, and click the smart tag to open the ToolStrip Tasks menu. Click ...
Get Visual C# 2005: A Developer's Notebook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.