Option Strict On
Option Explicit On
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim countl, countd, z As Integer
Dim Check As Boolean
Dim st, leksh As String
Dim line As String
Check = False
st = ""
z = 0
For i = 1 To 10
leksh = ""
Do While TextBox1.Text(z) <> " "
leksh = leksh & TextBox1.Text(z)
z = z + 1
Loop
Dim fileReader As System.IO.StreamReader
fileReader = _
My.Computer.FileSystem.OpenTextFileReader("C:\wordlist.txt")
Do While (fileReader.Peek() >= 0)
line = fileReader.ReadLine()
Check = False
If Len(leksh) = Len(line) Then
Check = True
countd = 0
countl = 0
For j = 32 To 126
For k = 0 To Len(leksh) - 1
If Chr(j) = leksh(k) Then
countl = countl + 1
End If
If Chr(j) = line(k) Then
countd = countd + 1
End If
Next
If countd <> countl Then
Check = False
End If
Next
End If
If Check = True Then
st = st & line & ","
End If
Loop
z = z + 1
Next
TextBox1.Text = st
End Sub
End Class
Edit: Somehow I messed it up and deleted the original post... Anyways the general dea can be found in the title, I want to hear ideas and I'm open to any suggestion...
This post has been edited by Cobok: 19 December 2009 - 03:04 AM

New Topic/Question
Reply


MultiQuote





|