MAF,
This is a two step operation. First, you want to call the PointToScreen
method on the form, passing the point, which is converted into screen
coordinates.
Then, you call the PointToClient method on the treeview control, passing
the converted point (in screen coordinates) and it will give you the point
in the coordinate system of the tree view control.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"MAF" <mf*****@henwoodenergy.com> wrote in message
news:OP**************@TK2MSFTNGP14.phx.gbl...
I am draggin an object into a user control that contains a tree view and
want to insert the object into the tree. The problem I have is that the X,
Y(coordinates for the form that contains the user control) are not within
the underlying treeview control. Isn't there a calculation that I can use
to adjust the x, y coordinates?
Thanks