- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am the first time user of this forum.
I would like to create a Fortran Console Application that runs on Win 98 without a dos window appearing. How can I do that?
I would like to create a Fortran Console Application that runs on Win 98 without a dos window appearing. How can I do that?
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The point of using console applications is to have a console. Technically, you could hide it but the code would be a little complicated (I could post it but right now I'm in quite a hurry).
The simpler method would be to recompile the application as Windows application,
replacing PROGRAM with:
Note, however, that in the latter case any attempt to PRINT * or WRITE(*) (which are useless anyway if the widnow is hidden) would cause a crash. If your program has command-line arguments, you couldn't use GETARG, but parse szCmdLine yourself.
Jugoslav
The simpler method would be to recompile the application as Windows application,
replacing PROGRAM with:
INTEGER(4) FUNCTION WinMain(hInst, hPrevInst, szCmdLine, nCmdShow) !DEC$ATTRIBUTES STDCALL, ALIAS:"_WinMain@16" :: WinMain !DEC$ATTRIBUTES REFERENCE:: szCmdLine INTEGER:: hInst, hPrevInst, nCmdShow CHARACTER(*):: szCmdLine
Note, however, that in the latter case any attempt to PRINT * or WRITE(*) (which are useless anyway if the widnow is hidden) would cause a crash. If your program has command-line arguments, you couldn't use GETARG, but parse szCmdLine yourself.
Jugoslav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You may find it enough simply to change the proprties associated with your console application. For example, set the properties of a shortcut to your .exe file to be "start minimised" or whatever phrase is used in your OS.

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