Opening in the current folder?

I have a project where I am using this code to open files with the .flu extension on them. It works so far:

[code] Dim f As FolderItem

//The actual FileTypes are converted to strings automatically for use
//with GetOpenFolderItem
f = GetOpenFolderItem( fluType )[/code]

The only issue is that it seems to default to opening in the Documents folder in Windows, and I want it to default to opening in the current running folder. How would I do this with GetOpenFolderItem?

Use http://documentation.xojo.com/index.php/FolderItemDialog which is much more customizable

I see it is more flexible, how do I open in the current running folder with FolderItemDialog?

INITIALDIRECTORY property.

aFolderItemDialog.InitialDirectory = newFolderItemValue
or
FolderItemValue = aFolderItemDialog.InitialDirectory
Full or relative path to directory whose contents are displayed when the dialog first appears.
The Filter property controls which files within this directory are visible. On Windows, this defaults to the My Documents directory if no FolderItem is specified.

Bear in mind that SAVING documents into the folder where your app lives is a big no-no.
If the flu files are read-only samples, you should be OK.
But you will need admin rights to save anywhere in program files.

Thats what the documents folder is for.

GetFolderItem() gets you the path of the current folder

So you are looking for

aFolderItemDialog.InitialDirectory = GetFolderItem()

Are-you sick ?

And if you store a reference to the Opened folder in a Module, you can use that value for the next Open (in InitialDirectory too) ?

Same apply for Save operations (with the same Property (FolderItem Reference) OR with a Save (FolderItem Reference) Property.