Click to See Complete Forum and Search --> : Open a folder....


AndyK
September 28th, 1999, 11:40 PM
You know when you press the command button, you can "open" and .exe, but I need to open a folder...like if I press button, I want it to open "c:\windows", so that I can see contains of "c:\windows" folder

Thank You

czimmerman
September 29th, 1999, 12:42 AM
I'll give you general outline of how to do this:

1. In VB6, use filesystem object to get a folder object. From the folder object, you can return a list of files in the folder. (If no VB6, you are stuck with the Dir Function).

2. Iterate through the files collection (or do until dir(FolderName) = "" if your not using VB6), adding each file name to a listview or list box control.

If this is not enough, let me know and I'll hammer out the code.

Ravi Kiran
September 29th, 1999, 03:26 AM
If you are looking for files use 'File-OPen' dialog of common dialog set.

If you want directories only selection use ShBrowseForFolder API. Search on this site for this. You can surely find a a few examples and links

RK

Arun Sahoo
September 29th, 1999, 04:03 AM
Shell ("C:\WINDOWS\Explorer.exe c:\windows")

this coce in click event will open windows dir