OberonPlace.com Forums  

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

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 21-05-2012, 05:13
Joe Joe is offline
Member
 
Join Date: Nov 2008
Location: Latvia
Posts: 92
Send a message via Skype™ to Joe
Question Trapped in GetUserClick - unusual behavior?

Hi all,

I am using code that's basically straight from the help files to get a user click and do certain actions, however for some reason with this code ESC does not break the cycle (it actually triggers the click action) and neither does the timeout.

Code:
Sub SmoothSeg()
    Dim X As Double, Y As Double
    
    B = False
    
    Dim Seg As Segment, S As Shape
    
    Set S = ActiveSelection.Shapes.First
    
    While Not B
        B = ActiveDocument.GetUserClick(X, Y, 0, 1, False, cdrCursorSmallcrosshair)
        
        If Not B Then
            Set Seg = S.Curve.FindSegmentAtPoint(X, Y, 0, 0.1)
            If Not Seg Is Nothing Then
                Seg.EndNode.Type = cdrSmoothNode
                Seg.StartNode.Type = cdrSmoothNode
                Seg.Type = cdrCurveSegment
                Seg.EndNode.Type = cdrSmoothNode
                Seg.StartNode.Type = cdrSmoothNode
                Seg.Type = cdrCurveSegment
            End If
        End If
    Wend
End Sub
The same basic thing seems to work just fine in other situations, so I suspect it has to do with the curve manipulation.

Any ideas?
Reply With Quote
 

Tags
curves, getuserclick, vba


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
Default word wrapping behavior on Paragraph Textbox Janga CorelDRAW/Corel DESIGNER VBA 1 12-02-2010 23:08
Default word wrapping behavior on Paragraph Textbox Janga General 0 11-02-2010 12:41
GetUserClick Webster CorelDRAW/Corel DESIGNER VBA 2 09-11-2006 02:03
GetUserClick? ssskurt CorelDRAW CS 0 23-12-2002 12:46


All times are GMT -5. The time now is 12:39.


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