Search Tools Links Login

Adding Gradients to VB forms

Posted: 2019-09-09
By: sbridge
Viewed: 169

Filed Under:

VB6 Custom Controls/Forms/Menus, VB6 Graphics, VB6 Code Cache

Title Uploaded Size 9/9/2019 7:49:51 AM 5,458

This example shows a couple of custom classes that can very easily be used to add gradients to your VB forms by painting them over standard rectangle shape objects.

You draw the shapes on the form, then in form_load you attach the shapes to the Gradients class, which over-rides the form's paint event to draw the gradient.

Supports 2 colour gradients Vertically and Horizontally.

Special Instructions

This code originally appeared on, and has been republished here with the permission of Andrea Tincani.

Comments on this post

No comments have been added for this post.

You must be logged in to make a comment.