The ROIs drawn on the image are stored in a collection (imageViewer.Roi)
imageViewer.Roi.Clear() will clear the ROIs drawn on the display control.
To add a new ROI, you first need to define its contour, then add it to the collection.
Dim roiContour As New RectangleContour(98, 134, 285, 182)
imageViewer.Roi.Add(roiContour)
Vision Development Module ships with .NET examples that you can find here:
C:\Program Files (x86)\National Instruments\Vision\Examples\dotNET
You can also prototype your algorithm using Vision Assistant, and generate the .NET code. This will show you how the different functions can be implemented in .NET.
Hope this helps,
-Christophe
Can you zip and attach a simple example that reproduces the problem?
Thanks,
-Christophe