CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 1999
    Location
    CA
    Posts
    83

    Non-rectangular buttons and frame animations

    I was just wondering if anyone knew how to make buttons (or picture boxes that would act like command buttons) that could be any shape. Also, I have a form that sizes itself around an image (unwanted areas are transparent) and was wondering if I could make it change shape to another image smoothly. Any help would be greatly appreciated.


  2. #2
    Join Date
    May 1999
    Location
    Omika, Japan
    Posts
    729

    Re: Non-rectangular buttons and frame animations

    Simple type of irregular shapes for any window ie has hWnd, ( labels etc are ruled out) can be got using SetWindowRgn fn, with approp rgn

    So, put a command btn, set its style to 1- picture, and add pictures, and on top of it set the (clip/window) region to any shape it works. But make sure that the picture is fully seen, and in both modes (down & up)

    If you already have the code of how to create a Region out of bitmap, then use that. it would be more correct, in the sense that if you change the bitmap the region changes automatically

    RK

  3. #3
    Join Date
    Jul 1999
    Posts
    145

    Re: Non-rectangular buttons and frame animations

    Go to www.vbaccelerator.com they have some cool code there for doing this


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

Featured