- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear all,
I am designing a dialog by using Visual Fortran. I have one button in my dialogwhich is designed to open parameter file. When I click that button,
a open file windown is opened(like we click the open icon in any software and give us the directory and file to choose) and I can choose thefile.
After I choose the file, the program will load these parameters in that file into that dialog.
But the problem is if I am not going to choose any file, a message box pops out ("A File must be selected, Terminate Program, Yes, No"). If I click the Yes, it will stop my program. If I click No, go back to open file window.
I still need to run my program, so I don't want to stop my program, and I also don't want to go back to open file again. I am thinking whether there is a way you can get out from selecting file andback to thedialog?.
Iam usingfollowing statement to open a file
open(36,file=' ',status='old',err=99)
Thanks!
Roy
Message Edited by royxu on 04-26-2005 06:35 AM
Message Edited by royxu on 04-26-2005 06:39 AM
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You are using the old Microsoft PowerStation way of prompting for a file, and it does not have the flexibility you want. I suggest instead that you use the GetOpenFilename Win32 API routine. An example demonstrating this is provided in the CVF samples under the name GETOPENFILENAME. If you can't find this, let me know.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ididn't find sample codeyou mentioned early. Could you please send it to me?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here it is.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you so much! I got it.
Roy

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page