General downloads

Browse for folder

Author
Jan Hoek  
Category
General downloads
Date
13/01/2003
Size
8,96 KB
Downloads
4686
MD5 digest
4CF08C6A2408F10F4674B2808135E451
Rating
43211
Popularity
Downloaded 5 times in the last two weeks
This tiny automation server retrieves the window handle for the active window. Most automation servers & custom controls that display a dialog require this value; they use it to identify the parent window for their dialog.

E.g. using the Shell object in the 'Microsoft Shell Controls And Automation' automation server, you can display a Browse for Folder dialog. Pass ActiveWindow.Handle as the first parameter of the BrowseForFolder method, and the dialog will sit on top of the Navision Attain application window.

This codeunit demonstrates how to use the 'Microsoft Shell Controls And Automation' automation server, together with my 'C/SIDE Utility Classes' to display an application-modal Browse for Folder dialog.

Note: On a Windows Vista or Windows 7 machine, if you are registering the automation server from the command prompt, you may need to run the prompt as administrator, since registering requires regsvr32.exe to have write access to your system's registry.
Download this file

Screenshots