Something like this i need in VB2008
Port 1 is closed <---red color
Port 2 is closed <---red color
Port 3 is closed <---red color
Port 4 is open <<---green color
Port 5 is closed <---red color
Port 6 is closed <---red color
How can i make it?
2 replies to this topic
#1
Posted 15 March 2011 - 02:25 PM
|
|
|
#2
Posted 16 March 2011 - 08:47 AM
Depends on if you're writing a console application or a GUI application.
If you are writing a GUI app, just set the ForeColor property of the control you wish to change color on. Like this:
The Color class is in System.Drawing, so make sure to import that.
If you're writing a console app, all you have to do is set the ForegroundColor property of the Console class, like this:
If you are writing a GUI app, just set the ForeColor property of the control you wish to change color on. Like this:
labelSomeLabel.ForeColor = Color.Greenor
labelSomeLabel.ForeColor = Color.Red
The Color class is in System.Drawing, so make sure to import that.
If you're writing a console app, all you have to do is set the ForegroundColor property of the Console class, like this:
Console.ForegroundColor = ConsoleColor.Red; Console.ForegroundColor = ConsoleColor.Green;
#3
Posted 17 March 2011 - 02:16 AM
So manyy thanks , you helped me a lot!
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









