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 27-06-2003, 06:46
hufersil
Guest
 
Posts: n/a
Default Live Preview

Hi guys,

I would like to make a live preview like Calendar Wizard 3.1
Somebody have any idea?

Thanks in advance
8)
Reply With Quote
  #2  
Old 10-07-2003, 17:55
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,940
Blog Entries: 4
Default Re: Live Preview

Calendar Wizard uses UI Extension library to create the preview. The dialog has an Image control on it. The macro creates a bitmap in memory using the library, saves it to a BMP file and loads it in the control to show on screen. I hope this helps.
Reply With Quote
  #3  
Old 11-07-2003, 05:58
hufersil
Guest
 
Posts: n/a
Default

but do you use this UI with Corel VBA or with CS?
And how do I load the dll in Corel VBA?
I'm using Corel DRAW 11
Reply With Quote
  #4  
Old 12-07-2003, 09:09
CorelUser
Guest
 
Posts: n/a
Default

hi all,
thanx Alex, and

As previous message indicates, how we will implement your .dll file in our vba project, and do I have to add an image control (or picture box) to show the created images/drawings in the memory.?

Thanks again...
Reply With Quote
  #5  
Old 12-07-2003, 17:49
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,940
Blog Entries: 4
Default Re: Live Preview

You can use the following VBA module (see attachment). It declares all the library's functions which you can use in VBA exactly like in CorelScript as explained on the web page above.

Then you can do it like this:

Code:
BeginImage 100, 100, vbWhite
ImageLine 0, 0, 100, 100, 1, vbRed
... Draw something more here ...

Dim s As String
s = CorelScriptTools.GetTempFolder() & "~Temp.bmp"
EndImage s
Image1.Picture = LoadPicture(s)
Image1.BackColor = vbWhite
Kill s
So, here I created an empty bitmap 100 x 100 pixels with white background. Drew a diagonal red line across it, then got a temporary file name, saved the bitmap to the file, loaded it into an image control Image1 and deleted the temporary file.

I guess this will give you an idea of how to do it.
Attached Files
File Type: bas ScpRtl.bas (6.7 KB, 637 views)
Reply With Quote
  #6  
Old 13-07-2003, 19:20
CorelUser
Guest
 
Posts: n/a
Default

excellent help, thanks alot..... gracias , merci. ... Alex

I'll try it and will post my studies...
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
The Print Preview Window dungbtl CorelDRAW CS 0 08-10-2004 09:49
Label Caption Live Update ddonnahoe CorelDRAW/Corel DESIGNER VBA 10 09-04-2004 10:59
Preview from CorelDRAW file and/or worksheet reanan CorelDRAW/Corel DESIGNER VBA 5 15-05-2003 18:29


All times are GMT -5. The time now is 12:10.


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