SetupViewerForRectangleSelection Method
Syntax
CWMachineVision.SetupViewerForRectangleSelection Viewer
Return Type
On success, this method returns 0. On failure, this function returns a negative number.
Purpose
Hides menu items in the pop-up menu of the given viewer so it displays only the tools needed to select an rectangle.
Remarks
Use this method as an alternative to selecting the appropriate tools in the CWIMAQViewer property page.
Parameters
Viewer As CWIMAQViewer
The viewer that contains the pop-up menu to modify.
Example
Private Sub Run_Click() 'After clicking on the Run button, the rectangle is the only shape type 'available, and the rectangle tool is selected. CWMachineVision1.SetupViewerForRectangleSelection CWIMAQViewer1 End Sub