- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I wrote a fortran code and want to exit the program automatically:
"
.................
Call Abort ("Simualtion is done!")
END Program
"
But the program will pop out a dialog box:
"
program terminated with exit code 0.
Exit Window?
"
So how do I automatically close a dialog box? I want to the program automatically exit and runthe next program rather than pushing a close button and then to the next program.
Thanks.
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Take a look at SETEXITQQ routine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How do I automatically close dialog box?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I do not quite understand what you want or what exactly you are doing. By calling ABORT with a message, you clearly want to view the message. Since ABORT sends the message string to fortran stream 0, then if it is a console program, the message will appear there I presume.The suggestion to use SETEXITQQ is good, as to exit without opening a message box (which is a dialog box of course)all you need is to issue the command
USE DFLIB
..
iresult=SETEXITQQ(QWIN$EXITNOPERSIST)
If you are running the program from a dialog box, and you want that dialog box to close, then, knowing the dialog's window handle (DLG%hWnd), you just send a WM_CLOSE message to it using the windows API functions SendMessage or PostMessage.

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