OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > VBA > Corel Photo-Paint VBA

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-02-2012, 05:16
hvw hvw is offline
Junior Member
 
Join Date: Jan 2012
Location: Ingelmunster (Belgium)
Posts: 13
Default Creating new specific document

The purpose is after correcting a photo or picture to make following steps:
1. make a new document with specific size and resolution
2. selecting borders to indicate the frame borders
3. original photo is kept in first window (if you have to restart)

Many thanks for helping (Sorry for the Dutch varables)

Code Userform
Private Sub OK_Knop_Click()

If OB20x30 = True Then
Breedte = 20: Hoogte = 30: Keuzegrootte = 1
ElseIf OB30x45 = True Then
Breedte = 30: Hoogte = 45: Keuzegrootte = 1
ElseIf OB40x60 = True Then
Breedte = 40: Hoogte = 60: Keuzegrootte = 1
ElseIf OB50x75 = True Then
Breedte = 50: Hoogte = 75: Keuzegrootte = 1
Else: Keuzegrootte = 0
End If

If OB_Hor = True Then
B = Breedte ' Omkeren breedte & Hoogte
H = Hoogte
Hoogte = B
Breedte = H
Keuzeligging = 1
End If

If OB_Vert = True Then
Ligging = "Hor": Keuzeligging = 1
End If

If FrmtBreedte <> "" And FrmtHoogte <> "" Then
Frmt = 1
Breedte = CInt(FrmtBreedte)
Hoogte = CInt(FrmtHoogte)
End If

If (Keuzegrootte = 1 And Keuzeligging = 1 And Frmt = 0) Or _
(Keuzegrootte = 0 And Keuzeligging = 0 And Frmt = 1) Then
Ingave = "OK"
Else
Ingave = "Verkeerd"
End If

Slip = 0.3
HulplijnB = 30
HulplijnL = 30

If Canvas = True Then
Slip = 0.7
HulplijnB = 69
HulplijnL = 69
End If

If CvBlind = True Then
Slip = 4.2
HulplijnB = 414
HulplijnL = 414
End If

Breedte = (Breedte + Slip) / 25.4 * 10 * 250
Hoogte = (Hoogte + Slip) / 25.4 * 10 * 250

If CvBlind = True Then
HulplijnR = Breedte - 414
HulplijnO = Hoogte - 414
ElseIf Canvas = True Then
HulplijnR = Breedte - 69
HulplijnO = Hoogte - 69
Else
HulplijnR = Breedte - 30
HulplijnO = Hoogte - 30
End If

Unload Keuzevenster

End Sub
---------------------------
Code
Public Ingave As String
Public Breedte As Long, Hoogte As Long
Public HulplijnB As Long, HulplijnL As Long, HulplijnO As Long, HulplijnR As Long
Dim Hulplijn As Guide, Doc As Document
Sub Vergroting()

Keuzevenster.Show

If Ingave = "OK" Then
Else
MsgBox ("Verkeerde ingave")
Keuzevenster.Show
End If

With Application.CorelScript
.EditCopy
.EditPasteDocument
End With

ActiveWindow.RulersVisible = True
ActiveDocument.SetResolution (250)

ActiveWindow.WindowState = cdrWindowMaximized
ActiveDocument.Resample Breedte, Hoogte, True

Set Hulplijn = ActiveDocument.CreateGuide(pntGuideHorizontal, 0, HulplijnB)
Set Hulplijn = ActiveDocument.CreateGuide(pntGuideHorizontal, 0, HulplijnO)
Set Hulplijn = ActiveDocument.CreateGuide(pntGuideVertical, HulplijnL, 0)
Set Hulplijn = ActiveDocument.CreateGuide(pntGuideVertical, HulplijnR, 0)

Set Doc = ActiveDocument

Doc.Mask.SelectAll

With Application.CorelScript
CorelScript.EditCopy
?????????????????
CorelScript.EditPasteObject
End With

End Sub
----------------
?????????
Here I would like to fill the background with a specific color
Attached Images
  
Reply With Quote
  #2  
Old 06-02-2012, 13:34
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,769
Blog Entries: 9
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 Create Document

To create a document you would do something like this:
Code:
Dim doc As Document
Set doc = CreateDocument(600, 800, cdrImageRGB)
Hope that helps,

-Shelby
Reply With Quote
Reply

Tags
resizing image


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
X5 Watch For Specific Action knowbodynow CorelDRAW/Corel DESIGNER VBA 15 06-05-2010 00:24
How to select a word at specific tab position aakkaarr CorelDRAW/Corel DESIGNER VBA 4 28-12-2009 14:43
Align to Specific Layer ProofingGuy CorelDRAW/Corel DESIGNER VBA 6 11-06-2008 17:11
Creating a Palette from a Document JudyHNM CorelDRAW/Corel DESIGNER VBA 2 10-11-2007 10:19
Creating new document problems ddonnahoe Code Critique 2 20-11-2004 17:11


All times are GMT -5. The time now is 21:36.


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