Searches the presentation space for the specified field beginning from the row and column position specified.

Namespace: ScreenUPG
Assembly: ScreenUPG (in ScreenUPG.dll)


Visual Basic (Declaration)
Public Function findField( _ 
   ByVal inRow As Integer,  _ 
   ByVal inCol As Integer,  _ 
   ByVal inMode As Integer,  _ 
   ByVal inType As Integer,  _ 
   ByVal inWrap As Integer,  _ 
   ByVal outRow As MutableInt,  _ 
   ByVal outColumn As MutableInt,  _ 
   ByVal outLength As MutableInt,  _ 
   ByVal outAttribute As MutableInt _ 
) As Boolean
public bool findField(
   int inRow,
   int inCol,
   int inMode,
   int inType,
   int inWrap,
   MutableInt outRow,
   MutableInt outColumn,
   MutableInt outLength,
   MutableInt outAttribute
 bool findField(
   int inRow,
   int inCol,
   int inMode,
   int inType,
   int inWrap,
   MutableInt outRow,
   MutableInt outColumn,
   MutableInt outLength,
   MutableInt outAttribute
) sealed 
public bool findField(
   int inRow,
   int inCol,
   int inMode,
   int inType,
   int inWrap,
   MutableInt outRow,
   MutableInt outColumn,
   MutableInt outLength,
   MutableInt outAttribute
public  function findField(
   inRow : int,
   inCol : int,
   inMode : int,
   inType : int,
   inWrap : int,
   outRow : MutableInt,
   outColumn : MutableInt,
   outLength : MutableInt,
   outAttribute : MutableInt
) : bool


The row in which to begin searching.
The column in which to begin searching.
The field to look for: current, next, or previous (from the specified row and column position). Possible values include FINDFIELD_CURRENT, FINDFIELD_NEXT and FINDFIELD_PREVIOUS.
The type of field to search for. Possible values FIELDTYPE_ANY, FIELDTYPE_PROTECTED and FIELDTYPE_UNPROTECTED.
Whether or not to wrap to the top after reaching the end of the presentation space. Possible values include: WRAP_ON and WRAP_OFF.
The row where the field was found. If the field is not found, the value is set to zero.
The column where the field was found. If the field is not found, the value is set to zero.
The length of the field that was found. If the field is not found, the value is set to zero.
A value representing the field attribute bits of the specified field. See Field Attributes for a list of field attributes returned for each host type.

Return Value

true or false. If the field is found, the value is set to true. Otherwise, it is set to false.


If you set both inRow and inCol to 1 and set inMode to FINDFIELD_NEXT, it will search for the next field that follows the specified position. If the specified field is found, the method returns true and the field's boundaries.



 Copy Code
            int inStartRow = 1;
            int inStartCol = 1;
            int inType = ScreenUPG.FIELDTYPE_PROTECTED;
            int inMode = ScreenUPG.FINDFIELD_NEXT;
            int inWrap = ScreenUPG.WRAP_ON;
            MutableInt outRow = new MutableInt(0);
            MutableInt outCol = new MutableInt(0);
            MutableInt outLength = new MutableInt(0);
            MutableInt outAttribute = new MutableInt(0);
            // Find the next protected field
            bool found = screen.findField(inStartRow, inStartCol, inType, inMode, inWrap, outRow, outCol, outLength, outAttribute);
 Copy Code
            Dim inStartRow As Integer
            Dim inStartCol As Integer
            Dim inMode As Integer
            Dim inWrap As Integer
            Dim inType As Integer
            Dim outRow As New Mutable.MutableInt
            Dim outColumn As New Mutable.MutableInt
            Dim outLength As New Mutable.MutableInt
            Dim outAttribute As New Mutable.MutableInt
            Dim found As Boolean
            inStartRow = 1
            inStartCol = 1
            inMode = 1
            inType = 1
            inWrap = 1
            'Find the next field
            found = screen.findField(inStartRow, inStartCol, inMode, inType, inWrap, outRow, outCol, outLength, outAttribute)

See Also