![]() |
|
#1
|
|||
|
|||
![]()
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 |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
X6 Save a copy | knowbodynow | CorelDRAW/Corel DESIGNER VBA | 5 | 27-06-2012 19:19 |
How can I copy an Envelope? | RobC | CorelDRAW/Corel DESIGNER VBA | 13 | 11-04-2008 14:33 |
Copy Layer | Mike83 | Corel Photo-Paint VBA | 0 | 09-02-2006 09:41 |
Draw X3: bug in "Font Size Next Combo Size" | wOxxOm | General | 3 | 31-01-2006 13:49 |
How sets size form same as size images ? | woycek21 | Corel Photo-Paint VBA | 0 | 09-07-2005 13:30 |