<!-- Article image -->
<!-- Add the rest of your HTML here -->
How can i use colors to make my console application look pretty with VB.NET ? I was writing a remoting server when this idea came ... So i've made this little module ! It was not really difficult to do but i think it could save your time ;)
How to use it ?
You can either change background and foregroud ...
... or just foreground :
How does it run ?
I just use kernel api's SetConsoleTextAttribute (to change colors) and GetStHandle (to retrieve console output handles). An enumeration has been created to have bases colors codes : enumeration values must be directly used to change foreground color, and enumeration values * 16 (mask) must be used to change foreground color.
So you just have now to use SetConsoleColors function (which use kernel's api) to change your console colors ...