VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Draw color gradient to picture box form or...

by Wayne Alec de Bruin (6 Submissions)
Category: Graphics
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sat 14th September 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Draw color gradient to picture box form or...

Rate Draw color gradient to picture box form or...



'
'   Colour fade form.
    On Error Resume Next
    '
    Dim intLoop As Integer 'Variable for loop
    '
'   Picture box AutoRedrdraw property must be " _
    set to True.
    With Picture1
        .DrawStyle = vbInsideSolid 'Set Form Modes
        .DrawMode = vbCopyPen
        .ScaleMode = vbPixels
        .DrawWidth = 2
        .ScaleHeight = 256
            For intLoop = 0 To 255 'Begin Loop
           'The RBG numbers can be changed to draw different colors
            Picture1.Line (0, intLoop)-(Screen.Width, intLoop - 1), RGB(150, 250, 350 - intLoop), B 'Draw boxes with specified color of loop
            Next intLoop
     End With
'
End Sub

Download this snippet    Add to My Saved Code

Draw color gradient to picture box form or... Comments

No comments have been posted about Draw color gradient to picture box form or.... Why not be the first to post a comment about Draw color gradient to picture box form or....

Post your comment

Subject:
Message:
0/1000 characters