- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Everyone,
I want to change the properties of the console window within the Fortran code. Basically, I want the text to be displayed in black color and the background in white.
--TaZ
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try:
use DFWIN
integer:: hConsole, b
hConsole = GetStdHandle(STD_OUTPUT_HANDLE)
b = SetConsoleTextAttribute(hConsole, &
BACKGROUND_RED+ BACKGROUND_GREEN+ BACKGROUND_BLUE )
Gary Scottis developing a library of wrappers for console-manipulation functions. Check out http://www.fortranlib.com/ezann.html.
Jugoslav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you Jugoslavfor your reply. Still the background color only effects the text which is displayed and rest of the console is still black. I found an alternative way, it might help someone.
Call SystemQQ("Color F0")
--TaZ
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