OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > VBA > CorelDRAW/Corel DESIGNER VBA

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 04-12-2002, 09:58
Rick Randall
Guest
 
Posts: n/a
Default Getting the mouse position

Hello---

I am writing a macro that I want for cleaning up CAD line art by deleting the uneccessary small lines. I basically want to modify the eraser tool so you don't have to select an object first. I want it to detect the line or lines that the round eraser mouse tool tip is over and delete those lines. I would also like for it to not care if a line is within a group. I can't seem to find any way for Corel VBA to detect where the mouse curser position is. Can anyone help me with this macro?


Thanks!

Rick
Reply With Quote
  #2  
Old 04-12-2002, 10:29
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,940
Blog Entries: 4
Default Re: Getting the mouse position

Rick,

I have a Delete Segment macro that does almost what you want: http://www.oberonplace.com/vba/drawm...delsegment.htm

However it requires you to click on a segment to delete it, not just click and drag.

If this is not good enough, you might try some luck using Windows API.

You can try to use SetCapture, GetCursorPos, and ReleaseCapture API functions. Once you get screen coordinates of the mouse pointer, you can convert it to document coordinates using Window.ScreenToDocument function. Note that this functionality is available in CorelDRAW 11 only. Warning - I'm not sure if this would actually work. It requires quite a bit of low level API fiddling and probably main CorelDRAW window subclassing to intercept mouse events. It's just an idea but no guarantee that it will actually work.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Position inch to mm GoodLook CorelDRAW/Corel DESIGNER VBA 2 11-11-2008 01:47
how to read point position (x/y) of any shape with VB-addin Andi CorelDRAW/Corel DESIGNER VBA 1 09-09-2004 09:32


All times are GMT -5. The time now is 02:26.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com