FolderDialog
Folder$ = FolderDialog(Title$, [Folder$])
 
Parameters:

    Title$ = Title of dialog
    [Folder$] = Optional starting folder for dialog
Returns:

    Folder$= The full path f the selected folder. If no folder was selected, it'll return a NULL string
 

     FolderDialog opens a windows folder dialog. So the folder dialog lets us select a folder (or drive) rather than a file name.



FACTS:


      * The FolderDialog function returns a NULL string if no folder was selected or the user selects cancel.

      * FolderDialog is not asynchronous, so the PlayBasic application will halt while the dialog is open.




 
Example Source: Download This Example
; Include the Dialogs library in this program
  #Include "PBDialogs"
  
; Title Of the Folder Dialog
  Title$="Select A Folder On Your Computer"
  
; Call the Folder Dialog, and set it's starting
; location to the current location
  FOlder$=FolderDialog(Title$,CurrentDir$())
  
; Display the Info about this file$
  If Folder$=""
     Print "You Selected To: Cancel"
  Else
     
     Print "Folder="+Folder$
     
     If FolderExist(Folder$)
        Print "This Folder Exists"
     Else
        Print "This Folder Doesn't Exist"
     EndIf
     
  EndIf
  
  // Display the screen & wait for a key press to end
  Sync
  WaitKey
  
  
  
  
 
Related Info: LoadDialog | SaveDialog :
 


(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com