LoadUseViewPerspective example for Visual Basic

Note: This topic is for Document/Medical only.

This example times the loading of a bitmap with and without changing the internal view perspective.

'Declare local variables
Dim StartTime, DeltaTime

'Do not include paints when measuring time.
Lead1.AutoRepaint = False

'Time the load using the bitmap's view perspective.
Lead1.LoadUseViewPerspective = True
StartTime = Now
Lead1.Load "d:\lead\images\rotated.tif", 0, 0, 1
DeltaTime = DateDiff("s", StartTime, Now)
MsgBox Str$(DeltaTime) + " seconds loaded as is"

'Time the load that converts the bitmap's view perspective.
Lead1.LoadUseViewPerspective = False
StartTime = Now
Lead1.Load "d:\lead\images\rotated.tif", 0, 0, 1
DeltaTime = DateDiff("s", StartTime, Now)
MsgBox Str$(DeltaTime) + " seconds converted on load"