Results 1 to 8 of 8

Thread: [RESOLVED] can i make form shadow 4 sides ?

  1. #1

    Thread Starter
    New Member riskiadi's Avatar
    Join Date
    Jul 2015
    Location
    Indonesian
    Posts
    14

    Resolved [RESOLVED] can i make form shadow 4 sides ?

    How to make form shadow with 4 sides ?
    I have been looking nowhere but I found only 2 side alone
    Smavdev

  2. #2
    Frenzied Member Gruff's Avatar
    Join Date
    Jan 2014
    Location
    Scappoose Oregon USA
    Posts
    1,293

    Re: can i make form shadow 4 sides ?

    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.
    Last edited by Gruff; Dec 29th, 2015 at 12:39 PM.
    Burn the land and boil the sea
    You can't take the sky from me


    ~T

  3. #3

  4. #4

    Thread Starter
    New Member riskiadi's Avatar
    Join Date
    Jul 2015
    Location
    Indonesian
    Posts
    14

    Re: can i make form shadow 4 sides ?

    Quote Originally Posted by The trick View Post
    Thanks dude !!!
    Smavdev

  5. #5
    PowerPoster
    Join Date
    Jun 2015
    Posts
    2,229

    Re: [RESOLVED] can i make form shadow 4 sides ?

    can you repost the zip in the codebank?

  6. #6

  7. #7
    PowerPoster
    Join Date
    Jun 2015
    Posts
    2,229

    Re: [RESOLVED] can i make form shadow 4 sides ?

    I guess I have a different understanding what is completed. Looks great! thanks.

  8. #8
    Addicted Member shagratt's Avatar
    Join Date
    Jul 2019
    Location
    Argentina
    Posts
    203

    Re: [RESOLVED] can i make form shadow 4 sides ?

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width