Results 1 to 2 of 2

Thread: gradient Coor for Frames ... Please help me..

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Feb 2002
    Posts
    30

    Thumbs up gradient Coor for Frames ... Please help me..

    I want to make frame's BackColor gradient.
    Like want to make label gradient we can set backstyle=1-opaque.
    Please help me

    My q is to make frame's BackColor gradient ?

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    Put a PictureBox inside your frame, and size it to the frame size. Try this:
    VB Code:
    1. Private Sub Grafitti(MyPB As PictureBox)
    2.     Dim x As Integer
    3.     Dim Colo As Integer
    4.     Dim x1 As Integer
    5.     Dim x2 As Integer
    6.     Dim y1 As Integer
    7.     Dim y2 As Integer
    8.    
    9.     MyPB.BackColor = vbBlack
    10.     MyPB.ScaleHeight = 100
    11.     MyPB.ScaleWidth = 100
    12.     For x = 0 To 300
    13.         DoEvents
    14.         x1 = Int(Rnd * 101)
    15.         x2 = Int(Rnd * 101)
    16.         y1 = Int(Rnd * 101)
    17.         y2 = Int(Rnd * 101)
    18.         Colo = Int(Rnd * 15)
    19.         MyPB.Line (x1, y1)-(x2, y2), QBColor(Colo)
    20.         MyPB.Line (x1, y2)-(x2, y1), QBColor(Colo)
    21.         MyPB.Line (x2, y1)-(x1, y2), QBColor(Colo)
    22.         MyPB.Line (y1, y2)-(x1, x2), QBColor(Colo)
    23.     Next x
    24. End Sub
    25.  
    26. Private Sub Command1_Click()
    27. Grafitti Picture1
    28. End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width