Console Applications -- character attributes

P

Paolo

I not e that with the Console class I can change foreground and background
colours, for example. Is there a way to control other character attributes
e.g. bold, bright, blinking? Or do I have to dive into the Windows API? And
if so where?

Thanks
 
P

Pavel Minaev

I not e that with the Console class I can change foreground and background
colours, for example. Is there a way to control other character attributes
e.g. bold, bright, blinking? Or do I have to dive into the Windows API? And
if so where?

You cannot make characters bold in text mode. Bright is just a matter
of color - out of 16 standard colors, the second 8 are just the
brighter versions of the first 8.

Blinking text is more interesting. It is possible in DOS mode, where
you have a switch that basically changes the upper 8 colors between a
"brighter" and a "blinking" variety - so you couldn't have both. The
feature is still present, but it is only accessible using DOS APIs
(and thus only from DOS programs). The default mode is bright. Once a
DOS program has switched the console to blinking mode, it persists
even after the program finishes executing, but there's no way to
change the mode using Win32 APIs. Also, blinking only works when the
console is full-screen, it's always in bright mode when it's windowed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top