Option Explicit
Private Sub Command1_Click()
Dim i As Single
cAvax1.AutoRedraw = False
Screen.MousePointer = vbHourglass
For i = 1 To 1200
Call cAvax1.Add_Rectangle(0, 0, i * 0.01, i * 0.01)
If i Mod 100 = 0 Then Label1.Caption = Str$(i): Label1.Refresh
If i = 1 Then cAvax1.UndoRecorderOn = True
cAvax1.ContinueUndo = True
Next i
cAvax1.UndoRecorderOn = False
cAvax1.ContinueUndo = False
cAvax1.AutoRedraw = True
Screen.MousePointer = vbDefault
End Sub
Private Sub Command2_Click()
cAvax1.Command = Undo_c
End Sub
Private Sub Command3_Click()
cAvax1.Command = Redo_c
End Sub
Private Sub Form_Load()
Command1.Caption = "Add Rectangles"
Command2.Caption = "Undo"
Command3.Caption = "Redo"
Label1.Caption = ""
Call cAvax1.StartAvax
End Sub
Private Sub Form_Unload(Cancel As Integer)
Call cAvax1.EndAvax
End Sub
Page 1 of 1
How to add many objects faster
#1
Posted 13 May 2008 - 01:08 PM
VB6 example on how to add many objects faster:
Athanasios Gardos
Avax-Software.com
Avax-Software.com
#3
Posted 14 May 2008 - 05:51 PM
UndoRecorder is to pack all objects as one into the undo queue.
Autoredraw=false/true is making the addition faster.
If you don't need undo/redo feature use the following declaration:
Call cAvax1.SetAvaxProperty(UndoRedoOn_p, False)
This will make the addition a little bit faster.
Autoredraw=false/true is making the addition faster.
If you don't need undo/redo feature use the following declaration:
Call cAvax1.SetAvaxProperty(UndoRedoOn_p, False)
This will make the addition a little bit faster.
Athanasios Gardos
Avax-Software.com
Avax-Software.com
Page 1 of 1
Sign In
Register
Help
Add Reply
MultiQuote