declare integer GetActiveWindow in WIN32API declare integer GetDC in WIN32API integer iHDC declare integer GetDeviceCaps in WIN32API integer iHDC,integer iIndex * Device context liHwnd=GetActiveWindow() liHDC=GetDC(liHwnd) * Pixels per Inch liPixelsPerInchX=GetDeviceCaps(liHDC,88) liPixelsPerInchY=GetDeviceCaps(liHDC,90) * Twips per pixel and store unLTVX=1440/liPixelsPerInchX unLTVY=1440/liPixelsPerInchY* In the treeviews mouse move you would need something like
procedure MouseMove(button, shift, x, y) IF thisform.chkHotTracker.Value oNode=this.HitTest(X*unLTVX,Y*unltvY) if type('oNode.text')==[C] this.NodeClick(oNode) else ENDIF ELSE ENDIF ENDPROCYou need to assure the node exists {if type('oNode.text')==[C]}, before you treat it like one:)