| | |
Search a .txt file for valid password.
Please support our VB.NET advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Aug 2005
Posts: 49
Reputation:
Solved Threads: 1
I've got a .txt file with lots of passwords in, in the following format:
(passwords must be between 12-15 characters)
password1
password2
password3
i want to use a text box that allows the user to enter a password & upon the correct password being entered they are allowed to proceed to the next form.
Thanks
(passwords must be between 12-15 characters)
password1
password2
password3
i want to use a text box that allows the user to enter a password & upon the correct password being entered they are allowed to proceed to the next form.
something like this, i would guess:
Dim sr as StreamReader = File.OpenText("C:\test.txt")
Dim password as string
if PasswordTextBox = 'a value inside the text file'
then 'proceed to next screen'
else 'password incorrect'Thanks
•
•
Join Date: May 2005
Posts: 514
Reputation:
Solved Threads: 19
VB.NET Syntax (Toggle Plain Text)
Private FileName AsString Dim sr As StreamReader Function MyParseFunc(ByVal strFileName AsString) Try FileName = strFileName sr = New StreamReader(FileName) 'using streamreader to read the opened text file Dim strHTml AsString = sr.ReadToEnd Dim userinput AsString = variable_passed Dim strStop AsString = "#end#" 'put this at the end of the file so it marks it as the end of file. Do Select case strHtml Case strHtml = LTime 'Do something here Case strHtml = CTime 'Do something here LoopWhile strHTml <> strStop Catch es As Exception MessageBox.Show(es.Message) Finally If Not (sr IsNothing) Then sr.Close() EndIf EndTry End Function
![]() |
Similar Threads
Other Threads in the VB.NET Forum
- Previous Thread: e.cancel simple problem??
- Next Thread: Help make mobile imaging app
Views: 1411 | Replies: 2
| Thread Tools | Search this Thread |
Tag cloud for VB.NET
.net 2005 2008 access account application arithmetic array arrays basic bing button buttons c# center check checkbox code combobox component convert crystalreport data database databasesearch datagrid datagridview design designer dissertation dissertations dropdownlist excel file-dialog folder ftp generatetags google gridview hardcopy highlighting images inline insert installer intel internet listview mobile monitor ms net networking output passingparameters peertopeervideostreaming picturebox picturebox1 plugin port print printing problem problemwithinstallation project save searchbox searchvb.net select serial server soap sorting studio syntax table tcp text textbox time timer toolbox trim update updown user vb vb.net vb.netcode vb.netformclosing()eventpictureboxmessagebox vb2008 vbnet view visual visualbasic visualbasic.net visualstudio visualstudio2008 web wpf





