How to: Create a Windows Explorer–Style Interface on a Windows Form
Windows Explorer is a common user-interface choice for applications because of its ready familiarity.
Windows Explorer is, essentially, acontrol and a control on separate panels. The panels are made resizable by a splitter. This arrangement of controls is very effective for displaying and browsing information.
The following steps show how to arrange controls in a Windows Explorer-like form. They do not show how to add the file-browsing functionality of the Windows Explorer application.
The dialog boxes and menu commands you see might differ from those described in Help depending on your active settings or edition. To change your settings, choose Import and Export Settings on the Tools menu. For more information, see.
To create a Windows Explorer-style Windows Form
Create a new Windows Application project. For details, see.
From the Toolbox:
Drag acontrol onto your form.
Drag a TreeView control into SplitterPanel1 (the panel of the SplitContainer control marked Panel1).
Drag a ListView control into SplitterPanel2 (the panel of the SplitContainer control marked Panel2).
Select all three controls by pressing the CTRL key and clicking them in turn. When you select the SplitContainer control, click the splitter bar, rather than the panels.
Do not use the Select All command on the Edit menu. If you do so, the property needed in the next step will not appear in the Properties window.
In the Properties window, set theproperty to .
Press F5 to run the application.
The form displays a two-part user interface, similar to that of the Windows Explorer.
When you drag the splitter, the panels resize themselves.