Verastream SDK .Net Reference
findField Method
Example 



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.
Searches the presentation space for the specified field beginning from the row and column position specified.
Syntax
'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
'Usage
 
Dim instance As ScreenUPG
Dim inRow As Integer
Dim inCol As Integer
Dim inMode As Integer
Dim inType As Integer
Dim inWrap As Integer
Dim outRow As MutableInt
Dim outColumn As MutableInt
Dim outLength As MutableInt
Dim outAttribute As MutableInt
Dim value As Boolean
 
value = instance.findField(inRow, inCol, inMode, inType, inWrap, outRow, outColumn, outLength, outAttribute)

Parameters

inRow
The row in which to begin searching.
inCol
The column in which to begin searching.
inMode
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.
inType
The type of field to search for. Possible values FIELDTYPE_ANY, FIELDTYPE_PROTECTED and FIELDTYPE_UNPROTECTED.
inWrap
Whether or not to wrap to the top after reaching the end of the presentation space. Possible values include: WRAP_ON and WRAP_OFF.
outRow
The row where the field was found. If the field is not found, the value is set to zero.
outColumn
The column where the field was found. If the field is not found, the value is set to zero.
outLength
The length of the field that was found. If the field is not found, the value is set to zero.
outAttribute
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.
Remarks
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.
Example
[C#] [VB]
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);
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)
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also