|
-
Nov 15th, 2000, 12:35 PM
#1
Thread Starter
Hyperactive Member
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!
-
Nov 15th, 2000, 12:44 PM
#2
_______
<?>
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)
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Nov 15th, 2000, 12:44 PM
#3
transcendental analytic
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
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Nov 15th, 2000, 12:50 PM
#4
Thread Starter
Hyperactive Member
-
Nov 15th, 2000, 01:44 PM
#5
Lively Member
mmmm?
This guy want WHITE and you give him red...
or am I colorblind?
btw Just kidding here :-)
To VB or not to VB, that's the question...
-
Nov 15th, 2000, 03:48 PM
#6
_______
<?>
I forgot how to spell "White"...
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Nov 16th, 2000, 04:13 AM
#7
transcendental analytic
odd`? BTW how did we come to think about red both of us?
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Nov 16th, 2000, 06:12 AM
#8
Addicted Member
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
-
Nov 16th, 2000, 06:25 AM
#9
Fanatic Member
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.
-
Nov 16th, 2000, 06:56 AM
#10
_______
<?>
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.
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Nov 16th, 2000, 07:33 AM
#11
Addicted Member
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
-
Nov 16th, 2000, 09:59 PM
#12
transcendental analytic
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
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|