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 18-07-2003, 08:54
NEHovis
Guest
 
Posts: n/a
Default I need to update objects visibility faster

' The question that I have is this: With my lookup table containing the
'object number and the visibility status, is there a way to update all
'objects visibility property and then do a "refresh" on the objects? (I am
'hoping that the time to refresh will be on the order of the
'PHOTOPAINT.CorelScript.ObjectVisible 1, 80, False command) In this
'example the time difference is not too bad. In my application, I have
'over 1000 objects which takes close to an hour and I need to repeat this
'process 5,000 - 10,000 times.
'I was not able to upload my program. To execute this code, in a new
'project, add 80 objects. In VB add two command buttons and two
'labels. The two buttons toggle the objects on and off and the labels to
'display the time.


Dim obj_ctr As Long
Dim Start, Finish, TotalTime


Private Sub CommandButton1_Click()
Start = Timer ' Note: The timer here is just to measure the response time.

' This line of code is processed very fast. In my actual program, this
'line updates all of the objects just about as fast. The problem
'that I have is that not all of my objects are all off or on. They are mixed.

PHOTOPAINT.CorelScript.ObjectVisible 1, 80, False

Finish = Timer
TotalTime = Finish - Start
Label2.Caption = TotalTime

End Sub

Private Sub CommandButton2_Click()
Start = Timer
' Note: In my code, I will change the visibility requirement for each
'object. This will be maintained in a lookup table (2-D Array ; object
'number, visibility: 1 on - 0 off)

For obj_ctr = 1 To 80

' Note: In the actual code, I have conditional statements and a
'lookup table to determine if this line of code is activated. If the lookup
'table for obj_ctr number 5 is to be on then this line would be activated.
'Please note that the process time to make the decisions in the actual
'program is fast. My problem comes in when I update the objects
'visibility. I also found that there is no difference in time from turning the
'objects on verses off.

PHOTOPAINT.CorelScript.ObjectVisible obj_ctr, obj_ctr, True

'Note: If you remove the comment on the DoEvents command, you
'will see the objects update one at a time. This will slow down the update
'time as well.

'DoEvents

Next obj_ctr

Finish = Timer
TotalTime = Finish - Start
Label2.Caption = TotalTime

End Sub
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
fit objects to path edges geopig Other Oberon Commercial Products 1 03-08-2006 00:28
Find objects by properties Webster CorelDRAW/Corel DESIGNER VBA 8 01-12-2004 19:51
Label Caption Live Update ddonnahoe CorelDRAW/Corel DESIGNER VBA 10 09-04-2004 11:59
Need help accessing objects in a group ama CorelDRAW/Corel DESIGNER VBA 5 20-02-2004 12:28
Module Update Available johndankey Macros/Add-ons 0 17-07-2003 15:47


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


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