Logo
programming4us
programming4us
programming4us
programming4us
Home
programming4us
XP
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Windows Phone
 
programming4us
Windows 7

Using the Windows 7 Libraries : USING THE EXPLORER BROWSER CONTROL (part 1) - Adding the Explorer Browser to Your Toolbox , Configuring the Explorer Browser Example

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
7/30/2014 9:02:38 PM

Explorer Browser is another in a long line of controls that Microsoft has provided for making it easier to create interesting applications using less code. As the name implies, it's a browser-like control that you can place on a form and use to explore various resources, including any known folder, non-filesystem container, or user-defined collection. You could also use it to explore the filesystem, the Internet, or any other resource desired. As you might imagine, the actual presentation you see depends on the kind of resource you explore and the presentation you choose to code as part of the control. The following sections describe how to work with the Explorer Browser control.

1. Adding the Explorer Browser to Your Toolbox

Before you can use the Explorer Browser control in an application, you need to add it to your Toolbox. The following steps help you get the Explorer Browser control set up for use with the example application. You can then use it for any application you want to create.

  1. Open the Toolbox by choosing View Toolbox or by pressing Ctrl+Alt+X.

  2. Right-click in any clear area of the Toolbox and choose Add Tab from the Context menu. You'll see a new tab added to the Toolbox.

  3. Type Explorer Browser as the tab's name.

  4. Right-click within the Explorer Browser tab and select Choose Items from the Context menu. You'll see the Choose Toolbox Items dialog box, as shown in Figure 1.

  5. Click Browse. You'll see an Open dialog box.

  6. Locate the Microsoft.WindowsAPICodePack.Shell.DLL file and click Open. Visual Studio automatically selects and highlights two controls for you, CommandLink and ExplorerBrowser, in the Choose Toolbox Items dialog box.

  7. Click OK. You'll see the two controls added to the Explorer Browser tab of the Toolbox, as shown in Figure 2.

    Figure 1. Use this dialog box to add the Explorer Browser control.
    Figure 2. The two controls related to the Explorer Browser appear in the Toolbox.

2. Configuring the Explorer Browser Example

This example begins with a Windows Forms application. You'll want a larger form, so set the Size.Width property to 700 and Size.Height property to 500. The setup for this example is a little more extensive than for other examples so far. Begin by adding a SplitContainer control. You won't need to rename it. However, set the following properties to make the SplitContainer control provide the containers required for the example:

  • Dock: Fill

  • IsSplitterFixed: True

  • Orientation: Horizontal

  • SplitterDistance: 21

Add a ComboBox control, lstFolders, to the upper split container. Set its Sorted property to True and its Dock property to Fill. Add an ExplorerBrowser control, Browser, to the lower split container and set its Dock property to Fill. Your dialog box should look like the one shown in Figure 3.

Figure 3. The example requires a little more configuration than normal.

Adding the ExplorerBrowser control automatically adds the required references to your application. However, you do need to provide the following using statement:

using Microsoft.WindowsAPICodePack.Shell;

Other -----------------
- Using the Windows 7 Libraries : CONSIDERING USER-DEFINED COLLECTIONS
- Using the Windows 7 Libraries : USING NON-FILESYSTEM CONTAINERS
- Using the Windows 7 Libraries : WORKING WITH KNOWN FOLDERS
- Conducting Research in OneNote 2010 : Translating Text
- Conducting Research in OneNote 2010 : Researching a Topic, Customizing the Research Task Pane
- Conducting Research in OneNote 2010 : Handling the Research Task Pane
- Microsoft Excel 2010 : Protecting and Securing a Workbook - Setting Macro Security Options
- Microsoft Excel 2010 : Protecting and Securing a Workbook - Setting ActiveX Security Options
- Microsoft Excel 2010 : Protecting and Securing a Workbook - Setting Add-in Security Options
- Microsoft Excel 2010 : Protecting and Securing a Workbook - Setting Document Related Security Options
 
 
Top 10
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
 
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server