Cannot get accurate results from Hittest

D

Duncan

Trying to write a routine that drags and drops from a listbox to a
treeview. However the hittest scaling is out.

First realised that X,Y values were in twips and hittest worked in
pixels but the scale is still out. My pixels-twips convertion is using
GetDeviceCaps reading the pixels per inch value but that is wrong.
Then wrote a routine using GetDeviceCaps referring to screen width and
screen resolution and doing the calculation itself but the result is
also wrong (screen width reports the wrong size of screen).

Does anyone have any suggestions? Using Excel 2003 and vista rolled-
back to XP.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top