How to make form shadow with 4 sides ?
I have been looking nowhere but I found only 2 side alone :duck:
Printable View
How to make form shadow with 4 sides ?
I have been looking nowhere but I found only 2 side alone :duck:
Sounds like sort of an odd request, however I would think that if you turned off a form's border you could draw shading of any kind all around a form perimeter using standard vb6 paint tools.
Here is a link to a site with code samples. scroll down to "Special Effects" then "Draw Border With API"
You would have to change the colors used and possibly make multiple rectangles.
can you repost the zip in the codebank?
That code isn't completed, therefore i can't publish it in the codebank.
I attach the code here.
I guess I have a different understanding what is completed. Looks great! thanks.
To have better rounded corners in the shadow when rounded forms are used (Aero W7) i moved the start shadow drawings inside the form
just changed this lines and disabled the center shadow (no longer needed) in MakeShadowForm:
Code:'ORIG StretchDIBits hDC, 0, 0, BlurRadius, BlurRadius, BlurRadius, 0, -BlurRadius, BlurRadius, bmpData(0, 0), bmpInfo, DIB_RGB_COLORS, vbSrcCopy
StretchDIBits hDC, 10, 10, BlurRadius, BlurRadius, BlurRadius, 0, -BlurRadius, BlurRadius, bmpData(0, 0), bmpInfo, DIB_RGB_COLORS, vbSrcCopy
'ORIG StretchDIBits hDC, 0, height - BlurRadius, BlurRadius, BlurRadius, BlurRadius, BlurRadius, -BlurRadius, -BlurRadius, bmpData(0, 0), bmpInfo, DIB_RGB_COLORS, vbSrcCopy
StretchDIBits hDC, 10, -10 + height - BlurRadius, BlurRadius, BlurRadius, BlurRadius, BlurRadius, -BlurRadius, -BlurRadius, bmpData(0, 0), bmpInfo, DIB_RGB_COLORS, vbSrcCopy
'ORIG StretchDIBits hDC, width - BlurRadius, 0, BlurRadius, BlurRadius, 0, 0, BlurRadius, BlurRadius, bmpData(0, 0), bmpInfo, DIB_RGB_COLORS, vbSrcCopy
StretchDIBits hDC, -10 + width - BlurRadius, 10, BlurRadius, BlurRadius, 0, 0, BlurRadius, BlurRadius, bmpData(0, 0), bmpInfo, DIB_RGB_COLORS, vbSrcCopy
'ORIG StretchDIBits hDC, width - BlurRadius, height - BlurRadius, BlurRadius, BlurRadius, 0, BlurRadius, BlurRadius, -BlurRadius, bmpData(0, 0), bmpInfo, DIB_RGB_COLORS, vbSrcCopy
StretchDIBits hDC, -10 + width - BlurRadius, -10 + height - BlurRadius, BlurRadius, BlurRadius, 0, BlurRadius, BlurRadius, -BlurRadius, bmpData(0, 0), bmpInfo, DIB_RGB_COLORS, vbSrcCopy
' // Draw sides
'ORIG StretchDIBits hDC, BlurRadius - 1, 0, width - BlurRadius * 2 + 1, BlurRadius, 0, 0, 1, BlurRadius, bmpData(0, 0), bmpInfo, DIB_RGB_COLORS, vbSrcCopy
StretchDIBits hDC, 10 + BlurRadius - 1, 10, -20 + width - BlurRadius * 2 + 1, 0 + BlurRadius, 0, 0, 1, BlurRadius, bmpData(0, 0), bmpInfo, DIB_RGB_COLORS, vbSrcCopy
'ORIG StretchDIBits hDC, BlurRadius - 1, height - BlurRadius, width - BlurRadius * 2 + 1, BlurRadius, 0, BlurRadius, 1, -BlurRadius, bmpData(0, 0), bmpInfo, DIB_RGB_COLORS, vbSrcCopy
StretchDIBits hDC, 10 + BlurRadius - 1, -10 + height - BlurRadius, -20 + width - BlurRadius * 2 + 1, BlurRadius, 0, BlurRadius, 1, -BlurRadius, bmpData(0, 0), bmpInfo, DIB_RGB_COLORS, vbSrcCopy
'ORIG StretchDIBits hDC, 0, BlurRadius, BlurRadius, height - BlurRadius * 2 + 1, BlurRadius, 0, -BlurRadius, 1, bmpData(0, 0), bmpInfo, DIB_RGB_COLORS, vbSrcCopy
StretchDIBits hDC, 10, 10 + BlurRadius, BlurRadius, -20 + height - BlurRadius * 2 + 1, BlurRadius, 0, -BlurRadius, 1, bmpData(0, 0), bmpInfo, DIB_RGB_COLORS, vbSrcCopy
' StretchDIBits hDC, width - BlurRadius, BlurRadius, BlurRadius, height - BlurRadius * 2 + 1, 0, 0, BlurRadius, 1, bmpData(0, 0), bmpInfo, DIB_RGB_COLORS, vbSrcCopy
StretchDIBits hDC, -10 + width - BlurRadius, 10 + BlurRadius, BlurRadius, -20 + height - BlurRadius * 2 + 1, 0, 0, BlurRadius, 1, bmpData(0, 0), bmpInfo, DIB_RGB_COLORS, vbSrcCopy
' // Center