|
-
Nov 11th, 2000, 02:46 AM
#1
Thread Starter
Member
i have a specific color, in the RGB or hex code that i want to use. How do i specify this color for the background of one of my forms. I want it to be exactly this color...
Also, how do i open a new form?
i thought it was "Show Form2" but i guess it's not...
-
Nov 11th, 2000, 03:04 AM
#2
Frenzied Member
Form Code:
Code:
Private Sub Form_Load()
Me.BackColor = &H8000000F
'you can also set this in form properties
End Sub
If you have added a new form (Form2):
Code:
Load Form2
Form2.Show
-
Nov 11th, 2000, 04:20 AM
#3
Hyperactive Member
You can do this
Code:
Private Sub Form1_Load()
Form2.BackColor = Form1.BackColor
End Sub
[i]
Good luck, Matt-D(eutschland)
-
Nov 11th, 2000, 04:27 AM
#4
Fanatic Member
Try This
' color setting
form1.backcolor = RGB(128,0,0) 'set backcolor red
' load and opens form
form1.show
' explanation of RGB(128,0,0)
RGB(Red as Integer, Green as Integer, Blue as Integer) as Long
Cheers
Ray
-
Nov 11th, 2000, 09:23 AM
#5
Thread Starter
Member
how do i convert my rgb code to the one that looks like &H8000000F ?
-
Nov 11th, 2000, 10:21 AM
#6
transcendental analytic
Code:
?"&H" & Hex(((blue * &H100) + green) * &H100 + red)
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 11th, 2000, 07:58 PM
#7
Thread Starter
Member
i must really be out of it... i don't get that code... i understand it, but i can't get it to work...
can someone tell me what the vb code for the color #003366 or RGB: red=0, green=51, blue=102
this is the color i need, but i can't seem to get any of it to work...
-
Nov 11th, 2000, 08:10 PM
#8
transcendental analytic
Whats the problem? I mean that hex code you gave is red:102 and blue:0, how did you get those values?
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
|