Open dialog to select exact file name

I want to open a dialog to browse for and select a particular file only (password key) called key.txt and nothing else. I know how to display all txt files but this isn’t what I want.

[code] Dim dlg as OpenDialog
Dim f as FolderItem

'Create open dialog
dlg=New OpenDialog

'Set up open dialog options
dlg.Title="Find key"
dlg.Filter= "key.txt"

'Show the Open dialog

If the key.txt file is always at the same location, you can use a direct access: check GetFolderItem(“key.txt”) (if in the application folder, you do not need to write to that file), or use a path to where it reside.

Ask the user what folder it lives in.?

Some apps have the password/serial key held in an xml file with a custom file extension.

By double clicking the file, it calls the opendocument method of your app, so you can parse the contents and maybe record the location if you wish.

If key.txt is just the saved password, you can save it where you like when they first type it…( they shouldnt be moving it around )- and it if is missing, ask them what the password is.

The key is an encrypted text file that I send them by email. Problem is they save the attachment anywhere on the computer so the program needs to know where to find it.
I was thinking along the lines of VB6 where you can enter the exact filename in the Filter property.
Is this possible with XOJO?
If not I’ll have to create a text filetype and validate every text file they open and prompt them that it isn’t key.txt

You could just let them paste the contents into a text box?

But this is the ‘custom file extension’ thing I mentioned.
Call the file key.GrechFile
Associate filetypes of .GrechFile with your app

User download the file and double clicks it
Your app gets it in an OpenDocument event.
You can open it, verify it, and record where it is located.

Okay, I need to learn a bit about using the OpenDocument event.
Good idea to give it a unique extension though. that weeds out all other choices.