Product : Engine, Version : 4.1.6.1028, ArticleID : 41023361

HowTo : Drawing entities with drawafter event using pan problem

Article41023361
TypeHowTo
ProductEngine
Version4.1.6.1028
Date Added1/5/2004
Submitted byTakis
Keywords

Subject

Drawing entities with drawafter event using pan problem

Summary

The entities which are drawn in the drawafter event when you use the middle mouse button to pan are not drawn correctly.

Solution

Add this to your code(see the ScrollView event for details):
Private Sub VDPro1_ScrollView(dx As Double, dy As Double, Cancel As Integer)
   VDPro1.ActiveDocument.ActiveLayOut.ViewCenter = Array( _
            VDPro1.ActiveDocument.ActiveLayOut.ViewCenter(0) - dx, _
            VDPro1.ActiveDocument.ActiveLayOut.ViewCenter(1) + dy, _
            VDPro1.ActiveDocument.ActiveLayOut.ViewCenter(2))
    VDPro1.Redraw
    Cancel = 1
End Sub