This document is archived and information here might be outdated.  Recommended version.


IConnectedCells.IsForeground Property (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (ArcScan)  

IConnectedCells.IsForeground Property

Indicates if the position is foreground or background.

[Visual Basic .NET]
Public Function get_IsForeground ( _
    ByVal position As IPoint _
) As Boolean
[C#]
public bool get_IsForeground (
    IPoint position
);

Product Availability

Available with ArcGIS Desktop. Requires ArcScan Extension.
[C#]

The following code shows an example of this method in C#.

//You can get app from ICommand :: OnCreate() hook parameter
IConnectedCells connectedCells=app.FindExtensionByName("ESRI ArcScan Tools") as IConnectedCells;

ESRI.ArcGIS.Geometry.IPoint currentPoint=new ESRI.ArcGIS.Geometry.Point();
currentPoint.PutCoords(39.4, 37.2);

System.Diagnostics.Debug.Print(connectedCells.get_IsForeground(currentPoint).ToString());
[Visual Basic .NET]

The following code shows an example of this method in VBNet.

  Public Sub IsForeground()
    'You can get app from ICommand :: OnCreate() hook parameter
    Dim connectedCells As IConnectedCells=TryCast(app.FindExtensionByName("ESRI ArcScan Tools"), IConnectedCells)

    Dim currentPoint As ESRI.ArcGIS.Geometry.IPoint=New ESRI.ArcGIS.Geometry.Point()
    currentPoint.PutCoords(39.4, 37.2)

    System.Diagnostics.Debug.Print(connectedCells.IsForeground(currentPoint).ToString())
  End Sub

See Also

IConnectedCells Interface