V
VKY
Hi everyone,
I have placed a treeview control on a userform (in VBA) and is trying to
implement an OLE drag and drop. On the mousemove event, I am using
TreeView1.HitTest method to detect which element the user has dragged.
The problem is that the x and y coordinates returned are in
OLE_XPOS_PIXELS. The HitTest event failed to return the proper element
unless I multiply the x/y coordinates by 15 which is the
Screen.TwipsPerPixelX property.
However, in VBA there is no Screen object and this constant may differ
from 15 when on another user with a different screen settings. Any
pointers into how I can convert the x/y values?
VKY
I have placed a treeview control on a userform (in VBA) and is trying to
implement an OLE drag and drop. On the mousemove event, I am using
TreeView1.HitTest method to detect which element the user has dragged.
The problem is that the x and y coordinates returned are in
OLE_XPOS_PIXELS. The HitTest event failed to return the proper element
unless I multiply the x/y coordinates by 15 which is the
Screen.TwipsPerPixelX property.
However, in VBA there is no Screen object and this constant may differ
from 15 when on another user with a different screen settings. Any
pointers into how I can convert the x/y values?
VKY