Cognex.VisionPro.Display.Controls Internal use only. Internal use only. Required designer variable. Clean up any resources being used. true if managed resources should be disposed; otherwise, false. Required method for Designer support - do not modify the contents of this method with the code editor. This control is used to setup, manipulate, and optionally load or save a colormap on a CogDisplay. Required designer variable. Clean up any resources being used. true if managed resources should be disposed; otherwise, false. Required method for Designer support - do not modify the contents of this method with the code editor. The exception that is thrown when the zoom value goes out of its range. The Zoom property must be between 2^-16 and 2^+16. Constructor The error message that explains the reason for the exception. Constructor The error message that explains the reason for the exception. The exception that is the cause of the current exception. If the innerException parameter is not a null reference, the current exception is raised in a catch block that handles the inner exception. The exception that is thrown when the user tries to run live display with a slave acquisition FIFO. Constructor The error message that explains the reason for the exception. Constructor The error message that explains the reason for the exception. The exception that is the cause of the current exception. If the innerException parameter is not a null reference, the current exception is raised in a catch block that handles the inner exception. The exception that is thrown when live display tries to share a fifo that is configured in auto trigger mode. Constructor The error message that explains the reason for the exception. Constructor The error message that explains the reason for the exception. The exception that is the cause of the current exception. If the innerException parameter is not a null reference, the current exception is raised in a catch block that handles the inner exception. The exception that is thrown when a child graphic has a space name that is something other than '$'. Constructor The error message that explains the reason for the exception. Constructor The error message that explains the reason for the exception. The exception that is the cause of the current exception. If the innerException parameter is not a null reference, the current exception is raised in a catch block that handles the inner exception. The exception that is thrown when an attempt was made to re-enter StartLiveDisplay or StopLiveDisplay, which these functions do not allow. Constructor The error message that explains the reason for the exception. Constructor The error message that explains the reason for the exception. The exception that is the cause of the current exception. If the innerException parameter is not a null reference, the current exception is raised in a catch block that handles the inner exception. The exception that is thrown when the group name specified did not match any known group name. Constructor The error message that explains the reason for the exception. Constructor The error message that explains the reason for the exception. The exception that is the cause of the current exception. If the innerException parameter is not a null reference, the current exception is raised in a catch block that handles the inner exception. Constructor The error message that explains the reason for the exception. Constructor The error message that explains the reason for the exception. The exception that is the cause of the current exception. If the innerException parameter is not a null reference, the current exception is raised in a catch block that handles the inner exception. Enumeration for the rendering engine used by the control. Uses Cognex Render Engine for drawing. Uses GDI Render Engine for drawing. Enumeration for mouse behavior modes. Used in to select the mouse mode. Specifies pan mode for the mouse. This mode is the easiest to pan images in. Specifies pointer mode for the mouse. This mode is for manipulating interactive graphics. Specifies user mode for the mouse. This mode allows easiest user customization of mouse behavior. Specifies zoom in mode for the mouse. This mode allows easy left-click zooming in. Specifies zoom out mode for the mouse. This mode allows easy left-click zooming out. Specifies touch mode for the mouse. This mode is intended to be used on touch screens. This mode allows easy double tap zooming. This mode allows easy panning. Also consider increasing the TouchDistance when setting MouseMode to Touch. Enumeration for mouse wheel behavior modes. The mouse wheel is inactive. Specifies standard Zoom mode for the mouse wheel. Specifies a more refined Zoom mode which is better suited for use with MouseMode Pan. Enumeration used with to specify the zooming method to use. Use to get or set the scaling method. Specifies continuous scaling. The image is nearest neighbor sampled to scale to the exact value of the property. Specifies continuous scaling. Bilinear interpolation is used to scale to the exact value of the property. Specifies integer scaling. The image is scaled using the largest integer scale value smaller than the property. Enumeration for specifying format of display content bitmap. Used in to specify the part of a display image to render as a bitmap. The content of the returned bitmap is determined by a passed content rectangle and bitmap size. The returned bitmap contains exactly what is visible in the display. The image is scaled and panned as it currently appears in the display, and graphics annotations are clipped at the display boundaries. The returned bitmap contains the full unscaled image with graphics annotations clipped at the image boundaries. Enumeration for method of specifying pan anchor. Used in , , , and to get and set the pan anchors. Indicates that the specified pan anchor is in absolute screen or image coordinates. Indicates that the specified pan anchor is relative to screen or image size. Enumeration for specifying z-order extents. Used in to specify the search direction. Specifies the front of the z-order. Specifies the back of the z-order. Enumeration for predefined colormaps Specifies no predefined colormap. Specifies a linear grey predefined colormap. Specifies a thermal predefined colormap. Specifies a height predefined colormap. Specifies a user defined colormap. A container for the display's static graphics. Any graphic object that implements that you to this container is displayed. Graphics added to this collection are static. You cannot change their location, color, or other attributes once they are added to the display. Use for movable, dynamic, or interactive graphics. See Displaying an Image, Annotating an Image, and Drawing Graphics to learn more about drawing images and graphics in a display control. Adds a list of static graphics to the display. The list of static graphics to add to the display. The name of the graphics group to which to add all of the . Thrown when the object is already disposed. Thrown when any of the arguments are invalid. Once added to the static graphics container, the graphics objects in the list cannot be changed. The location properties and of each graphic in the list determine where it is drawn. If the display control cannot resolve a graphic's selected space name (as described in ) then the graphic is added without error to the collection until its space name is resolvable. Set to false for better performance. However, if you add the same graphic to this container more than once, the behavior is undefined and errors may occur. Adds a static graphic to the display. The static graphic to add to the display. The name of the graphics group to which to add . Thrown when the object is already disposed. Thrown when any of the arguments are invalid. Once added to the static graphics container, the graphics object cannot be changed. The graphic object's location properties and its determine where the graphic is drawn. If the display control cannot resolve the graphic's selected space name (as described in ) then the graphic is added without error to the collection until its space name is resolvable. Set to false for better performance. However, if you add the same graphic to this container more than once, the behavior is undefined and errors may occur. Moves the specified group to the front of the z-order. The named group to move to the front of the z-order. Thrown when the object is already disposed. Thrown when an illegal name of the group is used. Moves the specified group to the back of the z-order. The named group to move to the back of the z-order. Thrown when the object is already disposed. Thrown when an illegal name of the group is used. Moves the specified group one group closer to the front of the z-order. The named group to move one group closer to the front of the z-order. Thrown when the object is already disposed. Thrown when an illegal name of the group is used. Moves the specified group one step closer to the back of the z-order. The named group to move to the back of the z-order. Thrown when the object is already disposed. Thrown when an illegal name of the group is used. Removes all static graphics from the display. Thrown when the object is already disposed. Removes all of the graphics in the specified group from the display. The name of the graphics group to remove from the display. Thrown when the object is already disposed. Thrown when an illegal name of the group is used. Dispose the control. Returns the z-order of the groups in this display. The z-order for the groups in this display. The first string in the collection is the name of the group drawn first. Thrown when the object is already disposed. Thrown when it fails to retrieve the return value--CogStringCollection. Object that contains user's interactive graphics. Any graphic object that implements that you to this container is displayed. Graphics that you add to this collection can be changed, moved, and manipulated interactively after being added to the display. If you add a graphic to this collection, then change its location or color, the graphic is updated immediately on the display See Displaying an Image, Annotating an Image, and Drawing Graphics to learn more about drawing images and graphics in a display control. Adds a list of interactive graphics to the display. The list of interactive graphics to add to the display. The name of the graphics group to which to add all of the . If true checks whether is already in the display container. Thrown when the object is already disposed. Thrown when any of the arguments are invalid. The location properties and of each graphic in the list determine where it is drawn. If the display control cannot resolve a graphic's selected space name (as described in ) then the graphic is added without error to the collection until its space name is resolvable. Set to false for better performance. However, if you add the same graphic to this container more than once, the behavior is undefined and errors may occur. Adds an interactive graphic to the display. The interactive graphic to add to the display. The name of the graphics group to which to add . If true checks whether is already in the display container. Thrown when the object is already disposed. Thrown when any of the arguments are invalid. The graphic object's location properties and its determine where the graphic is drawn. If the display control cannot resolve the graphic's selected space name (as described in ) then the graphic is added without error to the collection until its space name is resolvable. Set to false for better performance. However, if you add the same graphic to this container more than once, the behavior is undefined and errors may occur. Returns an enumerator that can iterate through the interactive graphics collection. An enumerator that can be used to iterate through the collection. Thrown when the object is already disposed. Moves the specified group to the front of the z-order. The name of the group to move to the front of the z-order. Thrown when the object is already disposed. Thrown when an illegal name of the group is used. Moves the specified group to the back of the z-order. The name of the group to move to the back of the z-order. Thrown when the object is already disposed. Thrown when an illegal name of the group is used. Moves the specified group one group closer to the front of the z-order. The name of the group to move one group closer to the front of the z-order. Thrown when the object is already disposed. Thrown when an illegal name of the group is used. Moves the specified group one step closer to the back of the z-order. The name of the group to move to the back of the z-order. Thrown when the object is already disposed. Thrown when an illegal name of the group is used. Removes all interactive graphics from the display. Thrown when the object is already disposed. Removes all of the graphics in the specified group from the display. The name of the graphics group to remove from the display. Thrown when the object is already disposed. Thrown when an illegal name of the group is used. Removes the interactive graphic at specified index from the display The index of the item to remove. Thrown when the object is already disposed. Thrown when an invalid index is used. Finds the first matching item and returns its index. The item to find or the name of a graphics group. When is , the search starts at the front of the z-order. When is , the search starts at the end of the z-order. The index of the matching item, or -1 if no item was found. Thrown when the object is already disposed. Thrown when any of the arguments are invalid. If is a group name, returns the first item in the group when is and the last item in the group when is . Dispose of the control. Returns the number of items in the collection. The number of items in the collection. Thrown when the object is already disposed. Thrown when it fails to retrieve the return value. Returns the item with the specified 0-based index. The zero-based index of the item to get. The specified item. Thrown when the object is already disposed. Thrown when an invalid index is used. Returns the z-order of the groups in this display. The z-order for the groups in this display. The first string in the collection is the name of the group drawn first. Thrown when the object is already disposed. Thrown when it fails to retrieve the return value--CogStringCollection. The display object that shows an image and static and interactive graphics. The Cognex Display control is an ActiveX control which displays images and graphics. You display images by setting the property to be the image you want to display. You display graphics by adding graphic objects to the or collections in a display. See Displaying an Image, Annotating an Image, and Drawing Graphics to learn more about drawing images and graphics in a display control. Constructor CR55371 was implemented using the .NET ContextMenuStrip and hiding the old OCX's ContextMenu Sets a colormap for 16-bit greyscale image display. The size of the colormap being set must match the type of 16-bit image being currently displayed (either 10, 12, 14, or 16-bit image) otherwise an exception is thrown. In order to change colormap sizes, remove any image being displayed. An ArrayList containing 256, 1024, 4096, 16384, or 65536 System.Drawing.Color values. Thrown when the display control is invalid. Thrown when an invalid colormap is specified. Returns the colormap for 16-bit greyscale image display. If the user has not set a colormap for 16-bit greyscale images, then null is returned. An ArrayList containing 256, 1024, 4096, 16384, or 65536 System.Drawing.Color values. Thrown when the display control is invalid. Clears the 16-bit greyscale colormap that has been set. This method does nothing if no 16-bit greyscale colormap has been set. Thrown when the display control is invalid. Sets a colormap for 16-bit range image display. The size of the colormap being set must match the type of 16-bit image being currently displayed (either 10, 12, 14, or 16-bit image) otherwise an exception is thrown. In order to change colormap sizes, remove any image being displayed. An ArrayList containing 256, 1024, 4096, 16384, or 65536 System.Drawing.Color values. Thrown when the display control is invalid. Thrown when an invalid colormap is specified. Returns the colormap for 16-bit range image display. If the user has not set a colormap for 16-bit range images, then null is returned. An ArrayList containing 256, 1024, 4096, 16384, or 65536 System.Drawing.Color values. Thrown when the display control is invalid. Clears the 16-bit range colormap that has been set. This method does nothing if no 16-bit range colormap has been set. Thrown when the display control is invalid. Sets the lower and upper limit of the colormap's range of interest expressed as a floating point number where 0.0 represents pixel value zero and 1.0 represents the max pixel value (which depends on the displayed image). The lower limit. Valid values for this param is in the range of 0.0 to 1.0. The upper limit. Valid values for this param is in the range of 0.0 to 1.0. Fires when the property value is changed. Thrown if lower or upper limits are less than 0.0 or more than 1.0. Thrown if the lower limit is greater than the upper limit. Thrown when the display control is invalid. Sets the lower and upper clip colors of the colormap range of interest. The lower clip color. The upper clip color. Fires when the property value is changed. Thrown when the display control is invalid. Loads and sets a colormap from the specified file. This method can only be called if an image is being displayed. Filename of the file that contains the colormap Thrown when the display control is invalid. Thrown if no image is being displayed. Thrown if a non 8-bit or 16-bit image is being displayed. Fires when the colormap is loaded. Saves the currently set colormap to the specified file. This method can only be called if an image is being displayed. Filename of the file that will contain the currently set colormap Thrown when the display control is invalid. Thrown if no image is being displayed. Thrown if a non 8-bit or non 16-bit image is being displayed. Internal use only Internal use only Returns the current content of the display (image and graphics) as a bitmap in a picture object. The type of content bitmap to create. The rectangle within the display to return as a bitmap. The maximum dimension for the requested bitmap. The returned bitmap. Thrown when the display control is invalid. Thrown when one of the followings happen: BitmapSize is less than 0, if return bitmap cannot be allocated, or CogSpaceTree errors if passed content rect cannot be mapped to pixel(#) space. The parameter specifies how the bitmap is created. If you use as the parameter the and parameters specify which portion of the displayed image is used to create the bitmap. If is zero, the returned bitmap is the unscaled portion of the image that describes. If is not zero, it is used as the largest dimension of the resulting bitmap, and the bitmap has the same aspect ratio as . If is and is zero, the returned bitmap is the unscaled contents of the display. Returns the OLE_COLOR that is mapped to a grey scale pixel value. The grey pixel value. The OLE_COLOR mapped to the grey value. Thrown when the display control is invalid. Thrown when the passed color is not a valid OLE_COLOR Returns the colormap for 8-bit greyscale image display. An ArrayList containing 256 System.Drawing.Color values. Thrown when the display control is invalid. Maps a grey scale pixel value to an OLE_COLOR. The grey pixel value to map for display. An OLE_COLOR to display instead of the grey pixel value. Thrown when the display control is invalid. Thrown when the passed color is not a valid OLE_COLOR All pixels in the image whose grey scale value is are displayed with the color . private void AcquireButton_Click(object sender, System.EventArgs e) { int trignum; // Display pixel values below 50 in dark red for (byte i = 0; i < 50; i++) cogDisplay1.SetImage8GreyColorMap(i, CogColorConstants.DarkRed); cogDisplay1.Image = mAcqFifo.Acquire(out trignum); cogDisplay1.Fit(true); numAcqs++; if (numAcqs > 4) { GC.Collect(); numAcqs = 0; } } Private Sub AcquireButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AcquireButton.Click Dim trignum As Integer Dim i as Integer ' Display pixel values below 50 in dark red For i = 0 To 50 cogDisplay1.SetImage8GreyColorMap(i, CogColorConstants.DarkRed) Next cogDisplay1.Image = mAcqFifo.Acquire(trignum) cogDisplay1.Fit(True) numAcqs += 1 If numAcqs > 4 Then GC.Collect() numAcqs = 0 End If End Sub Sets a colormap for 8-bit greyscale image display. The size of the colormap must be 256. An ArrayList containing 256 System.Drawing.Color values. Thrown when the display control is invalid. Thrown when an invalid colormap is specified. Clears the 8-bit greyscale colormap that has been set. Thrown when the display control is invalid. Returns the transform from to . The destination space. The source space. Thrown when the display control is invalid. lets you transform locations between the display's coordinate spaces and screen coordinates (which have the special name "*"). The values that you specify for and must be one of the following: "*" "#" a named space in or a named space in the image being displayed (including "." and "@") private void btnDraw_Click(object sender, System.EventArgs e) { CogTransform2DLinear xform; CogRectangle aRect; CogPointMarker cross = new CogPointMarker(); double dispX, dispY; int rectIX; // Draw a crosshair marker in the center of a rectangle whose coordinate space is "Cartesian", // but anchor it to the display coordinates ("*") so it does not move when you scroll xform = cogDisplay1.GetTransform("*", "Cartesian") as CogTransform2DLinear; // Find the interactive rectangle in the graphics group "rect" rectIX = cogDisplay1.InteractiveGraphics.FindItem("rect", Cognex.VisionPro.Display.CogDisplayZOrderConstants.Front); aRect = cogDisplay1.InteractiveGraphics[rectIX] as CogRectangle; // Map the point xform.MapPoint(aRect.CenterX, aRect.CenterY, out dispX, out dispY); // Draw the cross cross.GraphicType = Cognex.VisionPro.CogPointMarkerGraphicTypeConstants.Cross; cross.SizeInScreenPixels = 35; cross.X = dispX; cross.Y = dispY; cross.SelectedSpaceName = "*"; cogDisplay1.StaticGraphics.Add(cross, "cross"); } Queries the rendering engine for any special capabilities it might have. Queries for an interface that will allow them to tweak new features or disable them if they don't like them. An interface to the new rendering engine capability. Returns null if the engine does not support the new capability. Thrown when the display control is invalid. Sets the image pan anchor position. The x-coordinate of the pan anchor. The y-coordinate of the pan anchor. How the pan distance is computed. Fires when the image pan anchor point changes. Thrown when the display control is invalid. The image pan anchor is the center of the display control's display area for the purposes of image panning. When you specify a value for or you are specifying a distance between the image pan anchor point and the screen pan anchor point. When is , the values of and are in the range 0.0 to 1.0. The point (0,0) is the top left of the display and the point (1,1) is the bottom right of the display. When is , the values of and are absolute coordinate values. Returns the image pan anchor position. The x-coordinate of the pan anchor. The y-coordinate of the pan anchor. How the pan distance is computed. Thrown when the display control is invalid. The image pan anchor is the center of the display control's display area for the purposes of image panning. When you specify a value for or you are specifying a distance between the image pan anchor point and the screen pan anchor point. When is , the values of and are in the range 0.0 to 1.0. The point (0,0) is the top left of the display and the point (1,1) is the bottom right of the display. When is , the values of and are absolute coordinate values. Sets the screen pan anchor position. The x-coordinate of the pan anchor. The y-coordinate of the pan anchor. How the pan distance is computed. Fires when the screen pan anchor point changes. Thrown when the display control is invalid. The image pan anchor is the center of the display control's display area for the purposes of image panning. When you specify a value for or you are specifying a distance between the image pan anchor point and the screen pan anchor point. When is , the values of and are in the range 0.0 to 1.0. The point (0,0) is the top left of the display and the point (1,1) is the bottom right of the display. When is , the values of and are absolute coordinate values. Returns the screen pan anchor position. The x-coordinate of the pan anchor. The y-coordinate of the pan anchor. How the pan distance is computed. Thrown when the display control is invalid. The image pan anchor is the center of the display control's display area for the purposes of image panning. When you specify a value for or you are specifying a distance between the image pan anchor point and the screen pan anchor point. When is , the values of and are in the range 0.0 to 1.0. The point (0,0) is the top left of the display and the point (1,1) is the bottom right of the display. When is , the values of and are absolute coordinate values. Stops live image display. Thrown when the display control is invalid. If the display is not currently displaying live video, this function has no effect. Starts live image display using the specified acquisition FIFO. The image source. Must implement . If true, this method optimizes display performance, but there are some resitrctions on how you can use the FIFO. Thrown when the display control is invalid. If is true, optimizes display performance, but you should not attempt to use to acquire images while live video is running. If 's is , must be true. See Acquiring from a Live Display to learn how to acquire images while displaying live video. using Cognex.VisionPro; private CogFrameGrabbers myFrameGrabbers; private ICogFrameGrabber myFrameGrabber; private ICogAcqFifo myAcqFifo; private void AcquireDisplay () { const string VIDEO_FORMAT = "Sony XC75 640x480"; int tNum; myFrameGrabbers = new CogFrameGrabbers(); myFrameGrabber = myFrameGrabbers[0]; myAcqFifo = myFrameGrabber.CreateAcqFifo(VIDEO_FORMAT, Cognex.VisionPro.CogAcqFifoPixelFormatConstants.Format8Grey, 0, false); cogDisplay1.StartLiveDisplay(myAcqFifo, false); } Imports Cognex.VisionPro Private myFrameGrabbers As CogFrameGrabbers Private myFrameGrabber As Cognex.VisionPro.ICogFrameGrabber Private myAcqFifo As Cognex.VisionPro.ICogAcqFifo Private Sub AcquireDisplay() Const VIDEO_FORMAT = "Sony XC75 640x480" Dim tNum As Integer myFrameGrabbers = New CogFrameGrabbers myFrameGrabber = myFrameGrabbers.Item(0) myAcqFifo = myFrameGrabber.CreateAcqFifo(VIDEO_FORMAT, CogAcqFifoPixelFormatConstants.Format8Grey, 0, False) cogDisplay1.StartLiveDisplay(myAcqFifo, False); End Sub Uses the current to find the largest zoom value that allows the entire image to be visible in the display. If true, the image is scaled and panned so that all graphics are visible too. This parameter is ignored if there are no graphics or if the graphics all lie within the bounds of the image. Thrown when the display control is invalid. sets the scale and pan values so that the entire image is visible in the display. If there are graphics outside the area of the image and is true, the image is scaled and panned so that the image and graphics are visible. private void AcquireButton_Click(object sender, System.EventArgs e) { int trignum; cogDisplay1.Image = mAcqFifo.Acquire(out trignum); cogDisplay1.Fit(true); numAcqs++; if (numAcqs > 4) { GC.Collect(); numAcqs = 0; } } Private Sub AcquireButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AcquireButton.Click Dim trignum As Integer cogDisplay1.Image = mAcqFifo.Acquire(trignum) cogDisplay1.Fit(True) numAcqs += 1 If numAcqs > 4 Then GC.Collect() numAcqs = 0 End If End Sub Gets or sets the background color of the display. The background color. The background color appears between the borders of the image and the borders of the display control window. If there is no image in the window, this color completely fills the window. Gets or sets the predefined colormap on this display object. The predefined colormap. Default is CogDisplayColormapPredefinedConstants.None Fires when the property value is changed. Thrown when the display control is invalid. Gets or sets the lower limit of the colormap's range of interest expressed as a floating point number where 0.0 represents pixel value zero and 1.0 represents the max pixel value (which depends on the displayed image). The lower limit. Default value is 0.0. Valid values for this property are in the range of 0.0 to 1.0. Fires when the property value is changed. Thrown when the display control is invalid. Thrown if value is less than 0.0 or more than 1.0. Thrown if value is greater than ColorMapUpperRoiLimit. Gets or sets the upper limit of the colormap's range of interest expressed as a floating point number where 0.0 represents pixel value zero and 1.0 represents the max pixel value (which depends on the displayed image). The upper limit. Default value is 1.0. Valid values for this property are in the range of 0.0 to 1.0. Fires when the property value is changed. Thrown when the display control is invalid. Thrown if value is less than 0.0 or more than 1.0. Thrown if value is less than ColorMapLowerRoiLimit. Gets or sets the lower clip color of the colormap. This property is only valid if an image is being displayed and ColorMapPredefined is not None or Custom. The lower clip color. Default is Color.Black. Fires when the property value is changed. Thrown when the display control is invalid. Gets or sets the upper clip color of the colormap. This property is only valid if an image is being displayed and ColorMapPredefined is not None or Custom. The upper clip color. Default is Color.Black. Fires when the property value is changed. Thrown when the display control is invalid. Gets or sets the image currently in the display. The image in the display. When displaying images of different types and a colormap is set, you may have to call one of the colormap properties with a new value in order to update the internal colormap. Fires when an image is changed Thrown when the display control is invalid. To display an image, set this property to the image to display. Setting this property to causes the display to release its current image reference and to fill the display window with the background color. private void AcquireButton_Click(object sender, System.EventArgs e) { int trignum; cogDisplay1.Image = mAcqFifo.Acquire(out trignum); cogDisplay1.Fit(true); numAcqs++; if (numAcqs > 4) { GC.Collect(); numAcqs = 0; } } Private Sub AcquireButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AcquireButton.Click Dim trignum As Integer cogDisplay1.Image = mAcqFifo.Acquire(trignum) cogDisplay1.Fit(True) numAcqs += 1 If numAcqs > 4 Then GC.Collect() numAcqs = 0 End If End Sub Gets or sets whether the horizontal scroll bar is visible. True if the horizontal scroll bar is visible. Fires when the property value is changed. Thrown when the display control is invalid. If scroll bars are not visible, the user may still be able to pan the image using the pan mouse mode. Gets or sets whether the vertical scroll bar is visible. True if the vertical scroll bar is visible. Fires when the property value is changed. Thrown when the display control is invalid. If scroll bars are not visible, the user may still be able to pan the image using the pan mouse mode. Gets or sets whether the user can right-click to bring up a pop-up menu that controls the behavior of the display. True if the user can right-click to bring up the pop-up menu. Fires when the property value is changed. Thrown when the display control is invalid. The user can use the pop-up menu, shown below, to change the mouse mode, turn grid lines on and off, fit the image, and reset the Zoom to 1.0 Gets or sets the x-position of the image in the display. The x-position of the image in the display. Fires when the property value is changed. Thrown when the display control is invalid. The value is the distance, in image coordinates, between the image pan anchor and the screen pan anchor. A positive value means that the image anchor point is to the right of the screen anchor; a negative value means that it is to the left. Gets or sets the y-position of image in the display. The y-position of image in the display. Fires when the property value is changed. Thrown when the display control is invalid. The value is the distance, in image coordinates, between the image pan anchor and the screen pan anchor. A positive value means that the image anchor point is below the screen anchor; a negative value means that it is above. Gets or sets the scale value used to display the image and graphics. The scale value used to display the image and graphics. Fires when the property value is changed. Thrown when the display control is invalid. The actual scale value used depends on the property, which may truncate the value to the nearest smaller integer Gets or sets the scaling method the display control uses when zooming. The scaling method. Fires when the property value is changed. Thrown when the display control is invalid. Images can be scaled by integer factors or by floating point factors. Integer factors are often faster. Gets or sets whether drawing takes place. True if drawing takes place. Fires when the property value is changed. Thrown when the display control is invalid. When this property is true (the default), then all methods and properties that would change the appearance of a display are rendered immediately. If you are constructing a complex graphic display using many individual graphic objects, you can improve performance by disabling drawing, adding all the graphics, then enabling drawing. When you re-enable drawing, all rendering is performed. Note that setting this property to false also disables any updates to the display of the image, so changes to pan or zoom values will not appear until after drawing is re-enabled private void doDraw() { CogCircle mCircle = new CogCircle(); CogRectangle mRect = new CogRectangle(); cogDisplay1.DrawingEnabled = false; cogDisplay1.InteractiveGraphics.Add(mCircle, "Circle", false); cogDisplay1.InteractiveGraphics.Add(mRect, "Rect", false); mCircle.CenterX = cogDisplay1.Image.Width / 2; mCircle.CenterY = cogDisplay1.Image.Height / 2; mCircle.Radius = cogDisplay1.Image.Height / 4; mRect.SetCenterWidthHeight(mCircle.CenterX, mCircle.CenterY, cogDisplay1.Image.Width / 2, cogDisplay1.Image.Height /2); cogDisplay1.DrawingEnabled = true; } Private Sub doDraw() Dim mCircle As New CogCircle Dim mRect As New CogRectangle cogDisplay1.DrawingEnabled = False cogDisplay1.InteractiveGraphics.Add(mCircle, "Circle", False) cogDisplay1.InteractiveGraphics.Add(mRect, "Rect", False) mCircle.CenterX = cogDisplay1.Image.Width / 2 mCircle.CenterY = cogDisplay1.Image.Height / 2 mCircle.Radius = cogDisplay1.Image.Height / 4 mRect.SetCenterWidthHeight(mCircle.CenterX, mCircle.CenterY, cogDisplay1.Image.Width / 2, cogDisplay1.Image.Height / 2) cogDisplay1.DrawingEnabled = True End Sub Gets or sets the behavior of the display control in response to mouse input. The mouse mode behavior. Fires when the property value is changed. Thrown when the display control is invalid. The display has five different mouse behavior modes: Pointer Pan ZoomIn ZoomOut Touch Gets or sets the behavior of the display control in response to mouse wheel input. The mouse wheel mode behavior. Default is CogDisplayMouseWheelModeConstants.Zoom1 Fires when the property value is changed. Thrown when the display control is invalid. Gets or sets the sensitivity of the mouse wheel when zooming in the display. The mouse wheel sensitivity, default value is 1.0. The mouse wheel sensitivity cannot be less than 0. Thrown if value is less than 0 Fires when the property value is changed. Useful mouse wheel sensitivity values will likely be in the range 0.5 to 1.5. Setting the mouse wheel sensitivity 0 will effectivly disable zooming via the mouse wheel. Setting mouse wheel sensitivity to a value that is too high may also disable zooming via the mouse wheel. MouseWheelSensitivity is ignored if MouseWheelMode is None Gets or sets the sensitivity (how much to zoom in) when zooming in via double tapping. This setting only applies when MouseMode is set to Touch. The double tap zoom sensitivity, default value is 2.5. The double tap zoom sensitivity cannot be less than or equal to 1. Thrown if value is less than or equal to 1. Fires when the property value is changed. Sets/Gets the number of times double tapping (double clicking) on the Display will zoom in before a final double tap will restore the original zoom/pan settings. DoubleTapZoomCycleLength only applies when MouseMode is set to Touch. Default value is 1.0. The DoubleTapZoomCycleLength cannot be less than 1. Thrown if value is less than 1. Fires when the property value is changed. Returns true if live image display is active. True if live image display is active. Thrown when the display control is invalid. Returns the minimum value. The minimum value. Fires whenever the value is changed Thrown when the display control is invalid. Returns the maximum value. The maximum value. Fires whenever the value is changed Thrown when the display control is invalid. Returns the minimum value. The minimum value. Fires whenever the value is changed Thrown when the display control is invalid. Returns the maximum value. The maximum value. Fires whenever the value is changed Thrown when the display control is invalid. Gets or sets the rendering engine used to draw the contents of the display. The rendering engine. Fires when the value is changed Thrown when the display control is invalid. Returns a coordinate space tree containing coordinate spaces associated with this display control. The coordinate space tree. Thrown when the display control is invalid. The root space for this tree is the screen pixels used by this display control, with the origin in the upper-left corner, the positive x-axis extending to the right, and the positive y-axis extending down. You can use this coordinate space tree to make it easier to create display annotations that are independent of the image being displayed in the control and independent of any display zoom or pan. Returns a coordinate space tree containing coordinate spaces associated with this display control. The coordinate space tree. Thrown when the display control is invalid. The root space for this tree is the screen pixels used by this display control, with the origin in the upper-left corner, the positive x-axis extending to the right, and the positive y-axis extending down. You can use this coordinate space tree to make it easier to create display annotations that are independent of the image being displayed in the control. Unlike the space, this space reflects the effect of any pan and zoom settings for the display. Gets or sets whether the pixel grid is visible. True if the pixel grid is visible. Thrown when the display control is invalid. The pixel grid is visible when is greater than or equal to 64. Gets or sets the color of the pixel grid lines. The color of the pixel grid lines. Thrown when the display control is invalid. Gets or sets whether the sub-pixel grid is visible. True if the sub-pixel grid is visible. Thrown when the display control is invalid. The sub-pixel grid is visible when is greater than or equal to 128. Gets or sets the color of the sub-pixel grid lines. The color of the sub-pixel grid lines. Thrown when the display control is invalid. Gets the static graphics container that contains the static graphics in this display. The static graphics container. Thrown when the display control is invalid. You can add graphics to this collection to display them. private void doDraw() { CogCircle mCircle = new CogCircle(); mCircle.CenterX = 100; mCircle.CenterY = 100; mCircle.Radius = 75; cogDisplay1.InteractiveGraphics.Add(mCircle, "Circle"); } Private Sub doDraw() Dim mCircle As New CogCircle mCircle.CenterX = 100 mCircle.CenterY = 100 mCircle.Radius = 75 cogDisplay1.StaticGraphics.Add(mCircle, "Circle") End Sub Gets the interactive graphics container that contains the interactive graphics in this display. The interactive graphics container. Thrown when the display control is invalid. You can add interactive graphics to this collection to display them. private void doDraw() { CogCircle mCircle = new CogCircle(); mCircle.CenterX = 100; mCircle.CenterY = 100; mCircle.Radius = 75; mCircle.Interactive = true; mCircle.GraphicDOFEnable = CogCircleDOFConstants.All; cogDisplay1.InteractiveGraphics.Add(mCircle, "Circle", false); } Private Sub doDraw() Dim mCircle As New CogCircle mCircle.CenterX = 100 mCircle.CenterY = 100 mCircle.Radius = 75 mCircle.Interactive = True mCircle.GraphicDOFEnable = CogCircleDOFConstants.All cogDisplay1.InteractiveGraphics.Add(mCircle, "Circle", False) End Sub Gets or sets the touch distance in pixels. The touch distance. Thrown when the value is less than 1. Thrown when the display control is invalid. The touch distance is the minimum number of pixels within which the mouse must be from an interactive graphic to be considered touching the graphic. Gets or sets whether tool tips are displayed when the mouse is held over an interactive graphic. True if tool tips are displayed when the mouse is held over an interactive graphic. Thrown when the display control is invalid. Use the graphic's property to set its tool tip text. Gets or sets whether the user can select more than one interactive shape in the display. True if multiple selection is enabled. Thrown when the display control is invalid. If enabled, the user may select more than one shape by holding down the Control key while selecting. Gets the graphics that could not be rendered in the display. The graphics that could not be rendered in the display. Thrown when the display control is invalid. The interactive and static graphics in the lost-and-found list are those whose space name could not be resolved by the display control. Returns the collection of currently selected interactive shapes in the display. Warning: The Display does _NOT_ raise changed events when the selected graphics change! Additionally, a new CogGraphicInteractiveCollection is returned every time the getter for this property is called. The collection of selected interactive shapes. Thrown when the display control is invalid. Returns the interactive graphic the mouse is currently over. The interactive graphic or if the mouse is not over an graphic. Fires when the selection is made. Thrown when the display control is invalid. The mouse is considered over interactive graphic if it is within pixels of the graphic. Gets or sets whether the display is enabled. True if the display is enabled. Fires when the value is changed. Thrown when the display control is invalid. When the display control is disabled, it does not respond to mouse events. Gets or sets AutoFit. if true, the image is resized to fit the display whenever the size of the control changes. The default value is false. Fires when the value is changed. Thrown when the display control is invalid. Gets or sets AutoFitWithGraphics. If true, the image and the graphics are resized to fit within the display whenever the size of the control changes. The default value is false. Fires when the value is changed. Thrown when the display control is invalid. Gets or sets the MaintainImageRegion. if true, maintain the image region within the display as you resize the display. The property affects only the record selected. The next image that comes in will use the existing display settings. Other records are not affected. The default value is true. Thrown when the display control is invalid. Fires when the value is changed. Gets or sets the cursor that will be displayed whenever the MouseMode property is set to 'UserDefined'. The user-defined mouse cursor or . If null, a standard arrow cursor will be displayed in UserDefined mode. Fires when the value is changed. Thrown when the display control is invalid. Whether the visible pixel mask is displayed to the user or not. The fill color of the visible pixel mask. Internal Use only. None. Internal Use Only. Unknown. Internal Use Only. Grey8. Internal Use Only. Grey16_8bit. Internal Use Only. Grey16_10bit. Internal Use Only. Grey16_12bit. Internal Use Only. Grey16_14bit. Internal Use Only. Grey16_16bit. Internal Use Only. Range16_8bit. Internal Use Only. Range16_10bit. Internal Use Only. Range16_12bit. Internal Use Only. Range16_14bit. Internal Use Only. Range16_16bit. Internal Use Only. Color24Planar. Internal Use Only.