Gets or sets the image currently in the display.
Namespace: Cognex.VisionPro.DisplayAssembly: Cognex.VisionPro.Display.Controls (in Cognex.VisionPro.Display.Controls.dll) Version: 69.0.0.0 (69.0.0.0)
Syntax
Property Value
Type: ICogImageThe image in the display.
Events
| Event Type | Reason |
|---|---|
| CogDisplay Changed | Fires when an image is changed |
Exceptions
| Exception | Condition |
|---|---|
| AxHost InvalidActiveXStateException | Thrown when the display control is invalid. |
Remarks
Remarks
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.
Examples
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 SubSee Also