Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Mouse position on flowchart (Read 2073 times)
pelion
Junior Member
**
Offline



Posts: 61
Joined: Nov 12th, 2006
Mouse position on flowchart
Nov 12th, 2006 at 9:46pm
Print Post  
Hi,

I am aware I can get the mouse position properly via the DocClicked (and DoubleClicked) events, but otherwise, is it possible to ascertain the mouse position without requiring the user to click the flowchart (maybe via dochover/mousemove style event or some algorithmic way to work it out from MousePosition)

Thanks
JC
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Mouse position on flowchart
Reply #1 - Nov 13th, 2006 at 6:37am
Print Post  
Hi,

Control.MousePosition gives you the screen coordinates of the mouse pointer. Use the PointToClient and ClientToDoc methods to convert from the screen to the flowchart logical coordinates:

PointF mousePos = fc.ClientToDoc(fc.PointToClient(MousePosition));

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
pelion
Junior Member
**
Offline



Posts: 61
Joined: Nov 12th, 2006
Re: Mouse position on flowchart
Reply #2 - Nov 13th, 2006 at 8:44pm
Print Post  
Great, thanks alot
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint