Searches for the specified string in the Document's pages collection.
Syntax
Visual Basic (Declaration) | |
---|
Public Function Find( _
ByVal searchString As String, _
ByRef currentIndex As Integer _
) As Boolean |
Visual Basic (Usage) | Copy Code |
---|
Dim instance As Document
Dim searchString As String
Dim currentIndex As Integer
Dim value As Boolean
value = instance.Find(searchString, currentIndex)
|
Parameters
- searchString
String to search for in the document.
- currentIndex
- Starting position of the search. If the string was found, currentIndex is set to the position where the string was found.
Return Value
A Boolean value.
True, if the string was found in the document; otherwise,
false.
Example
C# | Copy Code |
---|
private void btnFind_Click(object
sender, System.EventArgs e)
{
int i = 0;
if (arv.Document.Find("Coyote", ref i) == true)
{
MessageBox.Show ("This document contains the word Coyote.");
arv.Document.ClearFindTextSelection();
}
} |
Visual Basic | Copy Code |
---|
Private Sub btnFind_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnFind.Click
If arv.Document.Find("Coyote", 0) Then
MsgBox("This document contains the word Coyote.")
arv.Document.ClearFindTextSelection()
End If
End Sub |
Remarks
See Also