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 01-06-2006, 13:24
Jon Lorber
Guest
 
Posts: n/a
Default Problem using "GetUserClick" with Snap?

I am experiencing a problem where I'm using GetUserClick to get a user's click at a node. I have show grid and grid snap off, snap to objects on and dynamic guides on.

The problem is that when I click on a node that is very close to a grid line it picks up the grid and you see the word "grid" flash momentarily. The value returned is of the grid. Again this is even though grid snap and view is off.

Is there anyway to eliminate grid as a potential snap for the snap to object? It doesn't show up in the list of snap objects in the snap to object setup.
Reply With Quote
  #2  
Old 02-06-2006, 02:41
wOxxOm's Avatar
wOxxOm wOxxOm is offline
Senior Member
 
Join Date: Mar 2005
Posts: 836
Default

Code:
Function GetUserClick(XCoord As Long, YCoord As Long, TimeOut As Long, IgnoreSnap As Boolean) As Long
maybe this will help
Reply With Quote
  #3  
Old 12-06-2006, 11:31
Jon Lorber
Guest
 
Posts: n/a
Default

I'm going to give it a try however I do want it to snap to nodes, edges, midpoints etc, just not the grid. I don't even have the grid on.

I think I detected a bug within the GetUserClick. It's very hard to see it because "# grid" flashes for a fraction of a second and even though your close to a node or edge it overrides and takes the grid coordinate.

Maybe it's me however I just thing that there should be an option in the Snap to Objects dialog that you can turn off grid as a snap detect point. It still snaps even if Snap to Grid is off.
Reply With Quote
  #4  
Old 12-06-2006, 11:47
wOxxOm's Avatar
wOxxOm wOxxOm is offline
Senior Member
 
Join Date: Mar 2005
Posts: 836
Default

when you use ActivePage.SelectShapesAtPoint it returns a shape object which has all the shapes in the given point under its shapes property. Check it in debugger - it may have grid object on top and your objects in stack.

Code:
dim shapesOK as new shapeRange, sh as shape
for each sh in ActivePage.SelectShapesAtPoint(x,y).shapes
   if sh.layer.name<>"Grid" then shapesOK.add sh
next
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
CD11 Convert to Bitmap -> CMYK to Gray scale problem xenio General 7 24-07-2005 21:46
range problem chinkyk CorelDRAW/Corel DESIGNER VBA 0 20-10-2004 10:00
Paste and Undo List problem Michael Cervantes Corel Photo-Paint VBA 5 11-09-2004 04:47
a problem... CorelUser General 2 20-06-2004 02:21
Problem with Export (or Save as) in AI-Format LOT CorelDRAW/Corel DESIGNER VBA 3 10-02-2004 14:28


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


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