×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
• Talk With Other Members
• Be Notified Of Responses
• Keyword Search
Favorite Forums
• Automated Signatures
• Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

#### Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

# A VB Tip

## A VB Tip

(OP)
Make a module :

Public Sub ColBox(Obj As Object, BX%, BY%, EX%, EY%, H%, R%, G%, B%, RE%, GE%, BE%)
Dim H2%, H3%, IvR%, IvG%, IvB%
Obj.AutoRedraw = True
Obj.ScaleMode = 3 'pixel
H3 = Int(H / 2)
IvR = Int(RE - R) / H3
IvG = Int(GE - G) / H3
IvB = Int(BE - B) / H3
Do While H >= H3
Obj.Line (BX + H2, BY + H2)-(EX - H2, EY - H2), RGB(R, G, B), B
Obj.Line (BX + H, BY + H)-(EX - H, EY - H), RGB(R, G, B), B
H = H - 1
H2 = H2 + 1
R = R + IvR
G = G + IvG
B = B + IvB
Loop
End Sub

Call ColBox(yurformname, 0, 0, yourformname.ScaleWidth - 1, yourformname.ScaleHeight - 1, 15, 128, 128, 128, 144, 192, 255)
yourformname.Move (Screen.Width - StartForm.Width) / 2, (Screen.Height - StartForm.Height) / 2
Label4.ForeColor = RGB(0, 0, 220)

End Sub

it's nice

Eric De Decker

### RE: A VB Tip

Uh looks pretty groovey
What does it do Vern.

### RE: A VB Tip

Eric...
very nice <g>
Is there any way to have it apply to all four sides of the form?
Or...could you comment the code so that us more simple minded folk could figure out how to adapt it?

Thanks,

Wayne Davis
quietman@home.com

### RE: A VB Tip

We don't need no stinkin' comments!

Real programmers do it in 1's and 0's ("hex" - I think they call it) don't they?

-ml

p.s. Actually eric - some comments would be nice <smile>

#### Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

#### Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Close Box

# Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

• Talk To Other Members
• Notification Of Responses To Questions
• Favorite Forums One Click Access
• Keyword Search Of All Posts, And More...

Register now while it's still free!