How to Use the Shell API function SHBrowseForFolder() ?



How to Use the Shell API function SHBrowseForFolder() ?..

Answer / Akhilesh Kumar Bharti

SHBrowseForFolder() is a Shell API function used to display the common file dialog for selecting a folder. In Delphi, you can use the ComObjActive, CreateObject functions to create an instance of the Shell32 library and call this function. Here's a simple example:nnTShell32 := ComObjActive(CLSID_CShellFolder);nSHBrowseForFolder(TShell32, PVoid(@lpf), 0, 0, SW_OPENFOLDER)nWhere lpf is an IPersistFile pointer object.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Delphi Interview Questions

How to prevent the user from moving or sizing my form?

1 Answers  


How to Hide the application from the Windows Taskbar?

1 Answers  


'Translate error, value out of bounds' error what does these errors mean?

1 Answers  


How to connect to an InterBase database using the BDE API?

1 Answers  


How to Set custom tabstops in a ListBox?

1 Answers  


How to get DLL function parameter listings ?

1 Answers  


How to Initialize an array or record to null?

1 Answers  


How to change the shape of your forms?

1 Answers  


How to Place multiple copies of a component on a form?

1 Answers  


How to Get a list of valid time zones from windows?

1 Answers  


How do I write a global error handler?

1 Answers  


How to Print a WEB page with the HTML control?

1 Answers  


Categories