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 02-09-2009, 18:45
vindaa
Guest
 
Posts: n/a
Default Rectangle Corner roundness

I have several Rectangles rotated at 45 digree, Is it possible to give roundness to its corners just using shortcut keys (Shift + Alt + Arrow keys)
Like Shift + Alt + Up Arrow key -- would round the upper corner of the rectangle
Further if I again preess Shift + Alt + Dn Arrow key -- it would round also the botttom corner of the rectangle and so on

Also just pressing Alt + dn Arroow key would remov the roundness of bottom corner of the rectangle

I am attaching a file to explain further what I want, I am using CorelDraw 13

Thanks
Attached Files
File Type: cdr corner curve.cdr (19.0 KB, 362 views)
Reply With Quote
  #2  
Old 02-09-2009, 23:11
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,782
Blog Entries: 11
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default Rectangle Roundness

Sure, just assign to follow to the keystrokes you want.
Code:
Sub LeftArrow()
    Dim r As Rectangle
    
    If ActiveShape.Type = cdrRectangleShape Then
        Set r = ActiveShape.Rectangle
        r.CornerUpperLeft = 100
    End If
End Sub

Sub DownArrow()
    Dim r As Rectangle
    
    If ActiveShape.Type = cdrRectangleShape Then
        Set r = ActiveShape.Rectangle
        r.CornerLowerLeft = 100
    End If
End Sub

Sub UpArrow()
    Dim r As Rectangle
    
    If ActiveShape.Type = cdrRectangleShape Then
        Set r = ActiveShape.Rectangle
        r.CornerUpperRight = 100
    End If
End Sub
Hope that helps,

-Shelby
Reply With Quote
  #3  
Old 04-09-2009, 05:45
vindaa
Guest
 
Posts: n/a
Default It does not work

I am sure I must be doing something wrong, but it does not work.
Reply With Quote
  #4  
Old 04-09-2009, 11:33
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,782
Blog Entries: 11
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default Hmmmmm

I need you to be a little more specific. What doesn't work? Does it do nothing? Does it not change the roundness as you expected? Any details would be great.

-Shelby
Reply With Quote
  #5  
Old 07-09-2009, 21:31
vindaa
Guest
 
Posts: n/a
Default No action

Means I Select a Rectangle and run the macro and nothing happens, I am using Corel 13.
Reply With Quote
  #6  
Old 08-09-2009, 12:12
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,782
Blog Entries: 11
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default Rectangle Roundness

Are you sure your shape is a rectangle not a curve?

-Shelby
Reply With Quote
  #7  
Old 09-09-2009, 21:52
vindaa
Guest
 
Posts: n/a
Default Tried on both

Actually I tried it both on rectangl & as well as curve. but nither works
Reply With Quote
  #8  
Old 10-09-2009, 08:44
thayne
Guest
 
Posts: n/a
Default success

I used Shelby's code successfully on the drawing that you (vindaa) provided.

To assign it to a key-stroke I made a toolbar and placed the macro as a command on the toolbar and then assigned the toolbar command the key-stroke.

Thayne
Reply With Quote
  #9  
Old 14-09-2009, 10:16
vindaa
Guest
 
Posts: n/a
Default

I am doing exactly the same but no result, I even triesd playing it but nothing happens. While I can successfully run my other macros through button, but I have no clue what is the problem with this one. As you said that it works on your pc, then what can be the other problem?
Reply With Quote
  #10  
Old 16-09-2009, 16:58
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,782
Blog Entries: 11
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default X3

I finally got a chance to try this in X3, and you are correct it does not work in X3. :-( I will have to think up another way.

-Shelby
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
box and corner radius issues dimmech CorelDRAW/Corel DESIGNER VBA 8 17-09-2012 07:59
Resizing rectangle without rescaling julvr CorelDRAW/Corel DESIGNER VBA 2 15-05-2009 08:22
4mm rectangle around the object fungel CorelDRAW/Corel DESIGNER VBA 11 06-03-2009 15:47
Absolute Corner Radius & Roundness CgNeophyte General 5 11-04-2006 18:51
Individual Round Corner Hernán New product ideas 1 20-01-2004 17:11


All times are GMT -5. The time now is 01:32.


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