M76 Posted August 19, 2011 Share Posted August 19, 2011 Hi what'd like to do is to manipulate drawing objects in the drawing in real time with constant user input. I'don't want to perform a simpla move or rotation, but much more complicated changes to the drawing objects involved. The main point is that the user has to see the effect in the drawing of every little mouse movement immmediately. That's why I need to somehow from the position of the cursor in the drawing window get the corresponding coordinates in drawing units. I've tried Private Declare Function GetCursorPos Lib "user32" _ (lpPoint As POINTAPI) As Long but I couldn't even manage to correlate the returned coordinates with the bounds of a form, not to mention drawing units. Quote Link to comment Share on other sites More sharing options...
ReMark Posted August 19, 2011 Share Posted August 19, 2011 Can you give us an example of what one of those "more complicated changes to the drawing objects" might be? Isn't "every little mouse movement" already conveyed to the user in the system tray via the coordinates (Relative, Absolute or Geographic) that are displayed there? Shouldn't the user be drawing everything in full size? Quote Link to comment Share on other sites More sharing options...
M76 Posted August 23, 2011 Author Share Posted August 23, 2011 The coordinates are not needed for the user, but for the macro to make the neccessary changes to the objects. But if there's a way to get the coordinates from the system tray that would be much better since then I don't have to bother with the mouse input. Quote Link to comment Share on other sites More sharing options...
Jack_O'neill Posted August 23, 2011 Share Posted August 23, 2011 I'm not sure anyone entirely understands what you're after, or what you are trying to do. The main point is that the user has to see the effect in the drawing of every little mouse movement immmediately. That happens anyway. Doesn't matter what you're doing, you see it as it happens. Maybe you could explain better what it is you want? Quote Link to comment Share on other sites More sharing options...
M76 Posted August 24, 2011 Author Share Posted August 24, 2011 I don't understand what you don't understand. I need the position of the pointer inside the model view in drawing units, I can't explain it any better than that. I wish to create a macro that updates drawing objects while taking the cursor position into account. For example the mouse moves 10 drawing units to the east, then move entity A 10 units north and move entity B 5 units east, and rotate entity C by 5 degrees. Or whatever. The exact modifications are not important I just invented these numbers. Quote Link to comment Share on other sites More sharing options...
M76 Posted August 24, 2011 Author Share Posted August 24, 2011 Anyway since I couldn't find a solution in reasonable time, I went with an easier solution for the original problem that doesn't involve the mouse coordinates, but I'm still interested if there's a way to get this information. Quote Link to comment Share on other sites More sharing options...
BlackBox Posted August 24, 2011 Share Posted August 24, 2011 (edited) Anyway since I couldn't find a solution in reasonable time, I went with an easier solution for the original problem that doesn't involve the mouse coordinates, but I'm still interested if there's a way to get this information. While the topics are slightly different, this thread *may* provide at least a partial solution. :wink: HTH Edited August 26, 2011 by BlackBox Quote Link to comment Share on other sites More sharing options...
M76 Posted August 26, 2011 Author Share Posted August 26, 2011 grread does exactly what I wanted, its not vba but that's no problem Quote Link to comment Share on other sites More sharing options...
BlackBox Posted August 26, 2011 Share Posted August 26, 2011 grread does exactly what I wanted, its not vba but that's no problem I'm glad the link was useful Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.