views:

363

answers:

4

FolderBrowserDialog displayed a text "Browse For Folder" as the title.

This Link says that using P/Invoke we can do that. Whats that? How to use P/Invoke for this?

Is there any other way also to change this?

A: 

In short, the answer is no. P/Invoke allows you to call native Windows API functions. You can read an old, but still relevant article, about it here: http://msdn.microsoft.com/en-us/magazine/cc164123.aspx

Unfortunately, the specific function you would need to invoke ShBrowseForFolder does not allow you to specify different text for the window title.

brendan
A: 

I dont think we can change the caption of the folder browser dialog, if there is a way then its using complex p/Invoke calls.

I know there is a interesting XBrowseForFolder - Wrapper for SHBrowseForFolder alternative available.

Its a vc++ component, you can use this component in your c# project with little coding effort from your side.

Cheers

Ramesh Vel
A: 

If you are developing software for Windows 7 (and using .NET 3.5 SP1) then you can download and use the Windows API Code Pack which bring along a bunch of additional controls which may offer an alternative to the FolderBrowserDialog.

Here's what is included in the Windows API Code Pack

Windows 7 Taskbar

  • Jump Lists, Icon Overlay, Progress Bar, Tabbed Thumbnails, and Thumbnail Toolbars

Windows Shell

  • Windows 7 Libraries
  • Windows Shell Search API support
  • Explorer Browser Control
  • A hierarchy of Shell Namespace entities
  • Windows Shell property system
  • Drag and Drop for Shell Objects
  • Windows Vista and Windows 7 Common File Dialogs, including custom controls
  • Known Folders and non-file system containers

DirectX

  • Direct3D 11.0, Direct3D 10.1/10.0, DXGI 1.0/1.1, Direct2D 1.0, DirectWrite, Windows Imaging Component (WIC) APIs

Others

  • Windows Vista and Windows 7 Task Dialogs
  • Sensor Platform APIs
  • Extended Linguistic Services APIs
  • Power Management APIs
  • Application Restart and Recovery APIs
  • Network List Manager APIs
  • Command Link control and System defined Shell icons
Kane
A: 

You cannot change the dialog box title. If you want that, you can consider using the commercial FolderBrowserDialog replacement component available in Shell MegaPack

logicnp