I hava a TreeView in VB6 that uses a PopupMenu when a Node is right clicked. As the VB6 PopupMenu defaults its position to the mouse coordinates the menu appears at the right place.
What I want to accomplish is that the Popupmenu appears at the right place too on a KeyDown event when a TreeView Node is selected. How can I do this?
You need to obtain coordinates of the item. For that you need to first obtain its handle. And when you get the rect, you must translate it to form coordinates.
Usage: