-
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...
-
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
-
You can do this
Code:
Private Sub Form1_Load()
Form2.BackColor = Form1.BackColor
End Sub
[i]
Good luck, Matt-D(eutschland)
-
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
-
how do i convert my rgb code to the one that looks like &H8000000F ?
-
Code:
?"&H" & Hex(((blue * &H100) + green) * &H100 + red)
-
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...
-
Whats the problem? I mean that hex code you gave is red:102 and blue:0, how did you get those values?