CopyTo Method

NI Vision for Visual Basic

CopyTo Method

Syntax

CWIMAQOval.CopyTo DestOval

Purpose

Copies all of the properties from the source oval into the destination oval.

Parameters

DestOval As CWIMAQOval

The destination oval object.

Example

Private Sub Run_Click()
    Dim Oval1 As New CWIMAQOval
    Dim Oval2 As New CWIMAQOval
    
    'Initialize the first oval
    Oval1.Initialize 55, 35, 125, 90
    
    'Copy the properties from the first oval into the second oval
    Oval1.CopyTo Oval2
    
    'Move the first oval. This move does not affect the second oval
    Oval1.Left = Oval1.Left + 70
    Oval1.Top = Oval1.Top + 70
    
    'Add the ovals to the viewer's regions collection.
    CWIMAQViewer1.Regions.AddOval Oval1
    CWIMAQViewer1.Regions.AddOval Oval2
End Sub

See Also

Initialize

CWIMAQRegions.AddOval