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 13-04-2004, 02:59
barnold
Guest
 
Posts: n/a
Default Detecting Last Node Selected?

CD11: I want to create 2 functions that will work like the align nodes functions in CD11, but that I can execute from a toolbar buttun or shortcut key. I want one for align-horizontal and one for align-vertical so I don't have to deal with the bass-ackwards CD11 node align dialog. Is there any way to detect which was the last node selected so I can know which node to align the others to? Or do you have another suggestions of a good way to implement this?

Many thanks in advance.

Bob Arnold
Reply With Quote
  #2  
Old 13-04-2004, 12:31
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,940
Blog Entries: 4
Default Re: Detecting Last Node Selected?

Bob,

I don't know a way of determining the last selected node through VBA.
Reply With Quote
  #3  
Old 14-04-2004, 02:36
barnold
Guest
 
Posts: n/a
Default Re: Detecting Last Node Selected?

Thanks Alex. I was afraid that might be the case.

Guess I'll go with a 3 step process: 1.) Select the nodes I want to move, 2.) click the command button or press the hotkey, and 3.) click the node to which I want to align the others (then get its X or Y coordinate and move the rest to it). Any thoughts on how to best program getting the coordinate in step 3? If I use GetUserClick how can I get the coordinates of the node closest to the point I click (assuming the click may not be perfectly at the point of the node)?

Thanks again for your help and the great support you give the CorelDRAW community. You are a treasure!

Bob Arnold
Reply With Quote
  #4  
Old 21-04-2004, 10:37
barnold
Guest
 
Posts: n/a
Default Re: Detecting Last Node Selected?

Looks like the question in my last psting got lost in the noise:

Quote:
Originally Posted by barnold

Any thoughts on how to best program getting the coordinate in step 3? If I use GetUserClick how can I get the coordinates of the node closest to the point I click (assuming the click may not be perfectly at the point of the node)?
Thanks for any insights.

Bob
Reply With Quote
  #5  
Old 21-04-2004, 13:03
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,940
Blog Entries: 4
Default Re: Detecting Last Node Selected?

Quote:
Originally Posted by barnold
Any thoughts on how to best program getting the coordinate in step 3? If I use GetUserClick how can I get the coordinates of the node closest to the point I click (assuming the click may not be perfectly at the point of the node)?
You'll need to go through all the nodes, calculate the distance from the point of the click to the node and pick the closest one.
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
Node Coordinate designation ddonnahoe CorelDRAW/Corel DESIGNER VBA 5 24-02-2005 09:00
Node Mover ddonnahoe Code Critique 6 23-02-2005 16:33
vba question bumblebee CorelDRAW/Corel DESIGNER VBA 4 04-08-2004 15:07
Problem Printing Selected Only shelbym CorelDRAW/Corel DESIGNER VBA 5 20-07-2004 20:06
Node selection question Peter Clifton CorelDRAW/Corel DESIGNER VBA 1 02-12-2003 12:00


All times are GMT -5. The time now is 05:46.


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