Click to See Complete Forum and Search --> : shape control
cksiow
July 11th, 2001, 05:13 AM
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
Cakkie
July 11th, 2001, 05:34 AM
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/ASP/txtCodeId.22627/lngWId.1/qx/vb/scripts/ShowCode.htm
Tom Cannaerts
slisse@planetinternet.be
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
Clearcode
July 11th, 2001, 06:42 AM
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-us/gdi/hh/gdi/regions_5vvy.asp
Hope this helps,
Duncan
-------------------------------------------------
Ex. Datis: Duncan Jones
Merrion Computing Ltd
http://www.merrioncomputing.com
CrownMaker
August 2nd, 2001, 06:20 PM
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: crownmaker@hotmail.com
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.