Zur Startseite

JRSpellChecker

Zur Homepage

GetAnagrams(ByVal word As String, ByVal Anagrams As Variant) As Boolean

Function:

returns a list with anagrams.

Note! this function returns only a value, if MS-Word dictionary is selected.

       

ico_syntax   Syntax:

JRSpell1.GetAnagram xWord, xAnagram

xWord

return anagrams for this word.

xAnagrams

list with anagrams words.

         

ico_weitere Return value:


True if anagrams was found.
fires no
event.

Example:

    Private Sub RichTextBox1_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
    If RichTextBox1.SelLength = 0 Then Exit Sub
    Dim ref As String
    Dim alternativ As Variant
    Dim n As Integer

    'not supported if lokal wordbook is active
    If JRSpell1.UsedWordbook = LokalWordBook Then Exit Sub

    startsel = RichTextBox1.SelStart
    ref$ = Mid$(RichTextBox1.Text, startsel + 1, RichTextBox1.SelLength)

    If Right$(ref$, 1) = " " Then
      RichTextBox1.SelLength = RichTextBox1.SelLength - 1
    End If

    List1(0).Clear
    List1(1).Clear
    List1(2).Clear

    If JRSpell1.GetMeanings(ref$, alternativ) Then
      For n = 0 To UBound(alternativ)
          If alternativ(n) <> "" Then List1(0).AddItem alternativ(n)
      Next n
    End If

    If JRSpell1.GetSynonyms(ref$, alternativ) Then
      For n = 0 To UBound(alternativ)
          If alternativ(n) <> "" Then List1(1).AddItem alternativ(n)
      Next n
    End If

    If JRSpell1.GetAnagrams(ref$, alternativ) Then
      For n = 0 To UBound(alternativ)
          If alternativ(n) <> "" Then List1(2).AddItem alternativ(n)
      Next n
    End If

    If JRSpell1.GetAntonyms(ref$, alternativ) Then
      For n = 0 To UBound(alternativ)
        If alternativ(n) <> "" Then List1(3).AddItem alternativ(n)
      Next n
    End If
    End Sub