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

Changing Console properties from VCF

tazmania23
Beginner
778 Views
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
0 Kudos
2 Replies
Jugoslav_Dujic
Valued Contributor II
778 Views

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
0 Kudos
tazmania23
Beginner
778 Views

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

0 Kudos
Reply