[ tosa @ 28.07.2002. 13:29 ] @
verovatno je ovo nekome zatrebalo... evo kako moze da se uradi: 1. "Add Reference" na \\winnt\\system32\\shell32.dll 2. dodati ovu funkciju u neku klasu ... i gotovo :) Code: public static string BrowseForFolder() { Shell32.IShellDispatch db = new Shell32.ShellClass(); Shell32.Folder folder = db.BrowseForFolder(0,"Please choose directory",64 | 16 | 8 | 32 | 1 | 32768,null); if (folder!=null) { try { Shell32.Folder par = folder.ParentFolder; return par.ParseName(folder.Title).Path; } catch (System.IO.FileNotFoundException ee) {return null;} catch (System.NotImplementedException ee) {return null;} return null; } |