Hi! You can identify if click point lie in the <br>rectangle if do this:<br><br> ------------------------------<br> ¦ ¦<br> P1 * * P2<br> ¦ ¦<br> ------------------------------<br><br>P1 and P2 - two points of line (P1=(x1,y1);P2=(x2,y2))<br>W - half width of this line;<br>no matter how this rectangle oriented on plane,<br>if You have point (x,y) then You can calculate<br><br> ((x-x1)*(y2-y1)-(x2-x1)*(y-y1))^2<br>A= ---------------------------------<br> (x2-x1)^2+(y2-y1)^2<br>if A above W*W then point(x,y) don`t hit to rectangle<br>else point(x,y) lie in given rectangle.<br>