×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • 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.

Students Click Here

A VB Tip

A VB Tip

A VB Tip

(OP)
Make a module :

Add procedure :

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

in you Form load :

Private Sub Form_Load()
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

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.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


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:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close