Get current cursor lower left position so that tooltip could be displayed properly
-
Hi all, I'm trying to display the tooltip by calling "ToolTip.Show(String, IWin32Window, Point)", but I wanted to do it like what Windows explorer does - displays the tooltip at the lower left corner of the cursor. I could get the mouse position by "MousePosition", but how could I get its lower left corner position? Thanks,
-
Hi all, I'm trying to display the tooltip by calling "ToolTip.Show(String, IWin32Window, Point)", but I wanted to do it like what Windows explorer does - displays the tooltip at the lower left corner of the cursor. I could get the mouse position by "MousePosition", but how could I get its lower left corner position? Thanks,
You'd have to get the current cursor icon and work out where inside it is the point that corresponds to the mouse 'position'.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
-
Hi all, I'm trying to display the tooltip by calling "ToolTip.Show(String, IWin32Window, Point)", but I wanted to do it like what Windows explorer does - displays the tooltip at the lower left corner of the cursor. I could get the mouse position by "MousePosition", but how could I get its lower left corner position? Thanks,
Hi, Most cursors have a size of (32,32); there is SystemInformation.CursorSize, but AFAIK that is a constant, it does not depend on current cursor, and active window. So the easiest thing to do would be to adjust MousePosition by (0,32). BTW: most cursors have their hotspot at (0,0); when this changes, you might want to take that in account too... :)
Luc Pattyn [Forum Guidelines] [My Articles]
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
-
Hi all, I'm trying to display the tooltip by calling "ToolTip.Show(String, IWin32Window, Point)", but I wanted to do it like what Windows explorer does - displays the tooltip at the lower left corner of the cursor. I could get the mouse position by "MousePosition", but how could I get its lower left corner position? Thanks,