Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29250 Discussions

how to automatically close dialog box?

xxwxxw
Beginner
980 Views
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.
0 Kudos
3 Replies
Jugoslav_Dujic
Valued Contributor II
980 Views
Take a look at SETEXITQQ routine.
0 Kudos
yatyatsun
Beginner
980 Views
How do I automatically close dialog box?
0 Kudos
anthonyrichards
New Contributor III
980 Views

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.

0 Kudos
Reply