PDA

Click to See Complete Forum and Search --> : Windows API - CreatePolygonRgn


EvgenyG
Feb 11th, 2000, 05:35 PM
Hello I want to make a Form , with my points
using "CreatePolygonRgn" but when i enter the wanted points , my form becomes WEIRD I don't know what points it took... It doesnt work.
If anybody worked with CreatePolygonRgn and knows how to give the EXACT location of the needed form please help

ron hunter
Feb 14th, 2000, 03:58 PM
I found the examples found at the following to be very helpful.
http://www.vb-world.net/controls/shapedforms/

ron hunter
Feb 15th, 2000, 05:56 PM
Evgenyg,

If you are still confused contact me at
r.hunter@napier.ac.uk and i'll attempt to help.

Ron

ljdarten
Feb 17th, 2000, 09:41 PM
i think i ran into this same problem actually.
it was a while ago, but i remember it had something to do with the polygon and the form using a different scale.

i had to use twipsperpixelX and twipsperpixely function.

here, i found it. the codes kinda screwy and i dont know if it's the best way to di it. but you can see where i used twipsperpixel.

TPPX = Screen.TwipsPerPixelX
TPPY = Screen.TwipsPerPixelY

ReDim TEMP(PNT.lbound To PNT.ubound) As
POINTAPI
For Tx = PNT.lbound To PNT.ubound
TEMP(Tx).x = PNT(Tx).Left / TPPX
TEMP(Tx).y = PNT(Tx).Top / TPPY
Next Tx

[This message has been edited by ljdarten (edited 02-18-2000).]