OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Corel User Forums > CorelDRAW > Macros/Add-ons

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 16-06-2019, 03:19
svk svk is offline
Junior Member
 
Join Date: Jul 2008
Posts: 3
Default Copy size

Till now I was using CorelDraw X5 and recently I have shifted to CorelDraw X9
And many of the old codes are now working anymore

I have this code which runs awesome on X5, can anyone help me so that it works on CorelDraw 2019. The code is as follows

-----------------------------

Option Explicit
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Private Const VK_SHIFT = &H10
Private Const VK_CONTROL = &H11

Sub EitherDim()
Dim s As Shape, sr As ShapeRange
Dim w As Double, h As Double, a As Double

Set sr = ActiveSelectionRange

sr(1).GetSize w, h
a = sr(1).RotationAngle

For Each s In sr
If IsShiftPressed() Then
's.SetSize w
s.SizeWidth = w
ElseIf IsCtrlPressed() Then
s.RotationAngle = a
Else
's.SetSize , h
s.SizeHeight = h
End If
Next s
End Sub

Public Function IsShiftPressed() As Boolean
IsShiftPressed = (GetAsyncKeyState(VK_SHIFT) < 0)
End Function

Private Function IsCtrlPressed() As Boolean
IsCtrlPressed = (GetAsyncKeyState(VK_CONTROL) < 0)
End Function
Reply With Quote
  #2  
Old 10-07-2019, 16:04
mtracy mtracy is offline
Member
 
Join Date: Jun 2012
Location: Niceville, Florida
Posts: 30
Default

Might try posting here.
__________________
Myron Tracy
Accent Signs
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
X6 Save a copy knowbodynow CorelDRAW/Corel DESIGNER VBA 5 27-06-2012 18:19
How can I copy an Envelope? RobC CorelDRAW/Corel DESIGNER VBA 13 11-04-2008 13:33
Copy Layer Mike83 Corel Photo-Paint VBA 0 09-02-2006 08:41
Draw X3: bug in "Font Size Next Combo Size" wOxxOm General 3 31-01-2006 12:49
How sets size form same as size images ? woycek21 Corel Photo-Paint VBA 0 09-07-2005 12:30


All times are GMT -5. The time now is 03:18.


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