Hi , All
I used GetFolder to open Browse Folder window , but it dont have "Create A New Folder" Button . Does anyone have an idea to get Browse Window with 'Create a New Folder' button ?
you may create a custom browse window of your's own,and use windows API to create a new folder,pfc_n_cst_filesrvwin32 show the tips.
the API declaration :
// Win 32 calls
Function ulong GetDriveTypeA (string drive) library "KERNEL32.DLL"
Function boolean CreateDirectoryA (ref string directoryname, ref os_securityattributes secattr) library "KERNEL32.DLL"
Function boolean RemoveDirectoryA (ref string directoryname) library "KERNEL32.DLL"
Function ulong GetCurrentDirectoryA (ulong textlen, ref string dirtext) library "KERNEL32.DLL"
Function boolean SetCurrentDirectoryA (ref string directoryname ) library "KERNEL32.DLL"
Function ulong GetFileAttributesA (ref string filename) library "KERNEL32.DLL"
Function boolean SetFileAttributesA (ref string filename, ulong attrib) library "KERNEL32.DLL"
Function boolean MoveFileA (ref string oldfile, ref string newfile) library "KERNEL32.DLL"
Function long FindFirstFileA (ref string filename, ref os_finddata findfiledata) library "KERNEL32.DLL"
Function boolean FindNextFileA (ulong handle, ref os_finddata findfiledata) library "KERNEL32.DLL"
Function boolean FindClose (ulong handle) library "KERNEL32.DLL"
Function boolean GetDiskFreeSpaceA (string drive, ref long sectpercluster, ref long bytespersect, ref long freeclusters, ref long totalclusters) library "KERNEL32.DLL"
Function ulong GetLastError() library "KERNEL32.DLL"
// Win32 calls for file date and time
Function ulong OpenFile (ref string filename, ref os_fileopeninfo of_struct, ulong action) LIBRARY "KERNEL32.DLL"
Function boolean CloseHandle (ulong file_hand) LIBRARY "KERNEL32.DLL"
Function boolean GetFileTime(ulong hFile, ref os_filedatetime lpCreationTime, ref os_filedatetime lpLastAccessTime, ref os_filedatetime lpLastWriteTime ) library "KERNEL32.DLL"
Function boolean FileTimeToSystemTime(ref os_filedatetime lpFileTime, ref os_systemtime lpSystemTime) library "KERNEL32.DLL"
Function boolean FileTimeToLocalFileTime(ref os_filedatetime lpFileTime, ref os_filedatetime lpLocalFileTime) library "KERNEL32.DLL"
Function boolean SetFileTime(ulong hFile, os_filedatetime lpCreationTime, os_filedatetime lpLastAccessTime, os_filedatetime lpLastWriteTime ) library "KERNEL32.DLL"
Function boolean SystemTimeToFileTime(os_systemtime lpSystemTime, ref os_filedatetime lpFileTime) library "KERNEL32.DLL"
Function boolean LocalFileTimeToFileTime(ref os_filedatetime lpLocalFileTime, ref os_filedatetime lpFileTime) library "KERNEL32.DLL"
I agree on the creation of a custom user control, but until OK is selected the "new" folder shouldn't be created... should only be a visual, IMO. Also, wouldn't the CreateFolder() function be easier than API's?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.