by Ed Porter (3 Submissions)
Category: Graphics
Compatability: VB Script
Difficulty: Advanced
Date Added: Wed 3rd February 2021
Rating: (16 Votes)
'Develop a "drop shadow" around a picturebox. Module uses standard APIs so that code will work in all versions of Windows (Win95 to WinXP).
Produces true, variable width, gradient transparent drop shadows that become part of the original graphic.
Inputs
PictureBox, shadow width
Assumes
'Procedure develops a "drop shadow" around a picturebox (sWidth in Pixels). The right and lower edge sections of the object container are stored in temporary Device Contexts and used as "background(s)" to create the shadow. These
sections are then added to the existing picturebox to create an integral effect.
Code Returns
Adjusted picturebox (includes gradient shadow)
Download Create Drop Shadows (22 KB)