File Chooser - want to make a form "return" a file name
Posted on 2002-03-12
I'm sure some one has done this before... what I want to have is a button called "Open File" on my main form. I want it so that when I hit this button it loads the "File Chooser" form and lets the user select a file
What I REALLY want though is for the form to return the file name (or a -1 for a fail. However, forms, to the best of my knowledge don't have returns... I have currently got around this by creating a driver function that waits for the user to select a file or cancels... when the user makes a choice the function closes the form and returns either the file name or a -1 to indicate no file chosen.
Any tips or code GREATLY appreciated...