本文整理汇总了VB.NET中System.Windows.Forms.RichTextBoxFinds枚举的典型用法代码示例。如果您正苦于以下问题:VB.NET RichTextBoxFinds枚举的具体用法?VB.NET RichTextBoxFinds怎么用?VB.NET RichTextBoxFinds使用的例子?那么恭喜您, 这里精选的枚举代码示例或许可以为您提供帮助。
在下文中一共展示了RichTextBoxFinds枚举的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: FindMyText
Public Function FindMyText(text As String, start As Integer) As Integer
' Initialize the return value to false by default.
Dim returnValue As Integer = - 1
' Ensure that a search string has been specified and a valid start point.
If text.Length > 0 And start >= 0 Then
' Obtain the location of the search string in richTextBox1.
Dim indexToText As Integer = richTextBox1.Find(text, start, _
RichTextBoxFinds.MatchCase)
' Determine whether the text was found in richTextBox1.
If indexToText >= 0 Then
returnValue = indexToText
End If
End If
Return returnValue
End Function