Page 2 of 2

Re: Select folder dialog

Posted: Tue Sep 09, 2025 8:13 am
by SPH
JHPJHP wrote: Mon Sep 08, 2025 4:34 pm

Code: Select all

IncludeFile "includes\CID.pbi"

*ofr.OPEN_FOLDER_REQUESTER = AllocateStructure(OPEN_FOLDER_REQUESTER)

Dim *ofr\AddPlace(2)
*ofr\AddPlace(0)        = GetHomeDirectory()
*ofr\AddPlace(1)        = GetTemporaryDirectory()

*ofr\Title              = "Open Folder Requester"
*ofr\FileNameLabel      = "Folder Name:"
*ofr\OkButtonLabel      = "Open"
*ofr\DefaultFolder      = GetHomeDirectory()
*ofr\DialogOptions      = #FOS_PICKFOLDERS | #FOS_FORCEFILESYSTEM | #FOS_PATHMUSTEXIST | #FOS_DONTADDTORECENT
*ofr\ExtraOption        = #True
*ofr\ExtraOptionEnabled = #True
*ofr\hWndOwner          = #Null

FolderPath$ = OpenFolderRequester(*ofr)

If FolderPath$
  If *ofr\ExtraOption
    If *ofr\ExtraOptionEnabled : ExtraOptionEnabled = #True : EndIf

    ExtraOption$ = #LF$ + #LF$ + "Extra Option: " + ExtraOptionEnabled
  EndIf
  MessageRequester("Open Folder Requester", "Folder Path: " + FolderPath$ + ExtraOption$, #PB_MessageRequester_Info)
EndIf
FreeStructure(*ofr)
Hi,
where can i find "includes\CID.pbi" please ?

thx