Hi again, after 6 days,
I recently learnt that GetPath function of GDI "retrieves the coordinates defining the endpoints of lines and the control points of curves found in the current path". I think my app matches the mousedown coordinates with the modified value of GetPath function and checks if user clicked on a line, circle or rectangle. So may be it also solves my problem. But unfortunately I have found a little about it: only description and arguments. I tried to write a sample app but vb shows error messages because of I don`t understand how to use tagPOINT type which is one of its arguments. Would you please tell me how can I use it successfully. I really need it.

All I know about it, is :

Function GetPath(hdc As Long, lpPoints As Long, lpTypes As Byte, nSize As Long) As Long
hdc

hdc [in] Handle to a device context that contains a closed path.
lpPoints
lpPoints [out] Pointer to an array of POINT structures that receives the line endpoints and curve control points.
lpTypes [out] Pointer to an array of bytes that receives the vertex types. This parameter can be one of the following values. Type Description
PT_MOVETO Specifies that the corresponding point in the lpPoints parameter starts a disjoint figure.
PT_LINETO Specifies that the previous point and the corresponding point in lpPoints are the endpoints of a line.
PT_BEZIERTO Specifies that the corresponding point in lpPoints is a control point or ending point for a Bézier curve.
PT_BEZIERTO values always occur in sets of three. The point in the path immediately preceding them defines the starting point for the Bézier curve. The first two PT_BEZIERTO points are the control points, and the third PT_BEZIERTO point is the ending (if hard-coded) point.

And I don`t know but does GDI accept also lines, arcs, recantgles... as object. Would you please tell me.

Thanks