-
This is something that has been puzzling me for quite a while:
In a nut shell, I creat a line at runtime like this:
Private Sub Command1_Click()
ang1 = 3 * 100
ang2 = ang1 * 3.1416 / 180
'here is where I create the line
Form1.Line (3430, 3000)-Step(Cos(ang1 + ang2 / 2) * 1320, Sin(ang1 + ang2 / 2) * 1320)
End Sub
Now, I'm wondering how I can make the above line white rather than black - which is the default.
Can this be done? Thanks in advance!
-
<?>
Code:
ang1 = 3 * 100
ang2 = ang1 * 3.1416 / 180
'here is where I create the line
Form1.ForeColor = vbRed
Form1.Line (3430, 3000)-Step(Cos(ang1 + ang2 / 2) * 1320, Sin(ang1 + ang2 / 2) * 1320)
-
Form1.Line (3430, 3000)-Step(Cos(ang1 + ang2 / 2) * 1320, Sin(ang1 + ang2 / 2) * 1320),vbred
You can as well use any RGBcolor instead of vbred
-
-
mmmm?
This guy want WHITE and you give him red...
or am I colorblind?
btw Just kidding here :-)
-
<?>
I forgot how to spell "White"...:D
-
odd`? BTW how did we come to think about red both of us? :confused:
-
Less Typing
"Red" consists of only three letters, and they happen to be neighbors on the keyboard. It's the perfect color to use for quick examples.
Shrog
-
If I correctly understood it you basically just need to change the line property.
add this line after you have created the line:
form1.line1.color = &H00000000
The color number is not actually the correct one (just figure it out in the properties box of line1)...
Hope this helps,
W.
-
<?>
wildcat_2000
That won't work.
Kedaman..I guess it's because maily we type and write on white and red is usually a color we ask for when we want something to stand out.
-
Not an Object
It won't work because it's not an object. If you add the Line control to the form, you have an object with a color property you can set. But we are using the Line method to draw a line on the screen. After it's been drawn, you cannot change the color. You have to do it before or while drawing it.
Shrog
-
The line object is usually a waste of resources, but sometimes when it comes to test animations, it could be useful
Well red is both easy to write and nice color - it's the one i use in icq since it shows best on both black and white.
also red is the LO byte so i use it often in test apps :)