CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: shape control

  1. #1
    Join Date
    Apr 2000
    Posts
    737

    shape control

    do anyone know how to make the shape control to display triangle ?? or there are other control that can display triangle with filled color ?

    thanks


    HTH

    cksiow
    http://vblib.virtualave.net - share our codes

  2. #2
    Join Date
    Jan 2000
    Location
    Olen, Belgium
    Posts
    2,477

    Re: shape control

    I have this post up on PlanetSourceCode.com
    This issues on how to give windows a shape (going from a tringle to bill gates). However, this code can be used on any object having a hWnd, and a picturebox would be the right player in your case. So you can set the appearance to flat, give a background color, and set the shape.
    http://www.planetsourcecode.com/xq/A...s/ShowCode.htm

    Tom Cannaerts
    [email protected]

    Programming today is a race between software engineers striving to build bigger and better idot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook
    Tom Cannaerts
    email: [email protected]
    www.tom.be (dutch site)

  3. #3
    Join Date
    Dec 1999
    Location
    Dublin, Ireland
    Posts
    1,173

    Re: shape control

    You can implement this functionality yourself by using CreatePolyRgn to create a triangular region and then in the Form_Paint event call FillRgn.

    Both of these API calls are documented at http://msdn.microsoft.com/library/en...gions_5vvy.asp

    Hope this helps,
    Duncan

    -------------------------------------------------
    Ex. Datis: Duncan Jones
    Merrion Computing Ltd
    http://www.merrioncomputing.com
    '--8<-----------------------------------------
    NEW -The printer usage monitoring application
    '--8<------------------------------------------

  4. #4
    Join Date
    Aug 2001
    Location
    Alberta, Canada
    Posts
    10

    Re: shape control

    If you send me your e-mail address I'll send you a free OCX that might do what you want. It's a shaper control that you can make any shape with. You would then apply this shape to a picture box to get a triangle. My E-Mail: [email protected]


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