Sub Button1_Click
Dim Input As String = Dialog.TextInputDialog("Anagrams","Enter Letter Jumble","","")
If Input.Length = 0 Then Return
Dim Permutations, Results As List
Permutations.Initialize
Results.Initialize
Permutations = GeneratePermutations(Input)
MainForm.Title = Input & " " & Permutations.Size
For Each Word As String In Permutations
Dim found As String
found = SQL.ExecQuerySingleResult2("SELECT Word FROM English WHERE Word = ? " ,Array As String(Word))
If found <> Null Then
Results.Add(found)
End If
Next
End Sub