VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Gradient module and sample code

by Michael Barnathan (11 Submissions)
Category: Custom Controls/Forms/Menus
Compatability: Visual Basic 3.0
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (3 Votes)

Yes! A module that creates gradients! This BAS file will seperate a color into red, green, and blue with one sub, then create a gradient in another. This BAS allows horizontal, vertical, or circular gradients to be created for your VB projects easily! It also has a quality feature, if your gradient is particularly large. This BAS can write to any control that can be drawn on. No API! UPDATED!!! This code can now create a gradient in ANY SHAPE OR SIZE!!!!!!!!!!!! Also added in the update: Common Dialog boxes for color picking, click the from and to boxes showing the sample color to get a common dialog for the appropriate one. Also new, is the feature to save your gradient as a bitmap file!

Code Returns
The sub CreateGradient returns a gradient image on the chosen canvas(Control). The sub SeperateColors takes a control's background color and splits it into Red, Green, And Blue components

Rate Gradient module and sample code

Download Gradient module and sample code

Download Gradient module and sample code (3 KB)

Gradient module and sample code Comments

No comments have been posted about Gradient module and sample code. Why not be the first to post a comment about Gradient module and sample code.

Post your comment

Subject:
Message:
0/1000 characters