Hello Coders.
I had a post already , and nobody answered it .Maybe was too complicated
Now I guess if I split my questions, somebody could help me.
I want to be able to read the left click mouse button coordination all the times . Is it possible ?
Regards,
Janet.
Solved! Go to Solution.
Solved by jeff. Go to Solution.
Solved by gopinath.taget. Go to Solution.
Hi Janet,
Are you looking to monitor the mouse click or mouse move? You mention click but your description sounds like you want to track mouse movements. If you want mouse movements, the best event handler is "Editor.PointMonitor" event in .NET.
Monitoring a click can be tricker and you might have to hook into Windows message filter if you want that.
Best Regards
Gopinath Taget
Maybe you could use PointMointer class
Maybe Something like
<CommandMethod("LastPoint")> _ Public Sub LastPoint() AddHandler Application.DocumentManager.MdiActiveDocument.Editor.PointMonitor, New PointMonitorEventHandler(AddressOf Editor_PointMonitor) End Sub Private previousPoint As Point3d Private Sub Editor_PointMonitor(sender As Object, e As PointMonitorEventArgs) Dim doc As Document = Application.DocumentManager.MdiActiveDocument Dim db As Database = doc.Database Dim ed As Editor = doc.Editor Dim lastPoint As Point3d = e.Context.LastPoint If (Not lastPoint = Nothing) AndAlso (lastPoint <> previousPoint) Then ed.WriteMessage(vbLf & "{0} {1}", lastPoint.X.ToString(), lastPoint.Y.ToString()) previousPoint = lastPoint End If End Sub
But Gopinath Taget is much more knowledgeable and probably knows the pitfalls and 'gotchas' of this method.
But and entity has GeometricExtents property, and other properties and other methods to figure out if it falls in the rectangle you mentioned in previous post.
Gopinath and Jeff.
I appreciate your help . Yes that is what I wanted.
Now I can start do something.
Thanks again for all your help .
Jeff . Your Code made me Cry. It works and it is exactly what I want.
Regards