Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

GetFolder function,Please! Help! 1

Status
Not open for further replies.

cb333

Programmer
Jan 15, 2007
6
0
0
US
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 ?

im using PB9.0

Thank a lot !!!
 
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?
 
hi

by API,you can new a folder when clicked "OK" or "New Folder" button.
sorry,may be have,but i don't the easier solution.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top