OberonPlace.com Forums  

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

Thread Tools Search this Thread Display Modes
Old 26-03-2013, 03:08
0meg@ 0meg@ is offline
Join Date: Nov 2010
Posts: 37
Default How to create rectangle by coordinates?

I have working area of my engraving machine, the same adjusted page in Corel Draw. When i put piece of material i know (every time i am learning) coordinates of uper left corner of piece of material and right down coordinates. I need to draw rectangle in Corel Draw document in same sizes and location of real material on the machine table. All this I need to be made as user form where i can input 4 coordinates (uper left corner of piece of material and right down coordinates of piece of material laying on the table)
Reply With Quote
Old 28-03-2013, 00:27
0meg@ 0meg@ is offline
Join Date: Nov 2010
Posts: 37

I was trying to use this code but rectangel was wrong size and position!

Private Sub CommandButton1_Click()
Dim rect As Shape
Dim x, y As Integer
Dim xpos, ypos As Integer
'Set rect = ActiveLayer.CreateRectangle2(0, 0, 3, 1)
x = TextBox3.Value - TextBox1.Value
y = TextBox4.Value - TextBox2.Value
xpos = TextBox1.Value
ypos = TextBox2.Value
Set rect = ActiveLayer.CreateRectangle2(xpos, ypos, x, y)

End Sub
Reply With Quote

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
Measurements / X Y Coordinates jfelder General 7 10-07-2009 09:16
Shape Coordinates jess916 Macros/Add-ons 9 08-07-2009 12:26
Create Rectangle-Shape with positioning WernerHo CorelDRAW/Corel DESIGNER VBA 2 06-02-2008 03:40
Obtaining XY coordinates and plotting edferg CorelDRAW/Corel DESIGNER VBA 1 17-06-2007 10:16
Understanding coordinates andyb CorelDRAW/Corel DESIGNER VBA 1 10-07-2003 18:09

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

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