VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Checks username and Password from a text file using Filescripting.

by Praveen Kasana (1 Submission)
Category: Files/File Controls/Input/Output
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sun 23rd May 2004
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Checks username and Password from a text file using Filescripting.

API Declarations


'the Project menu..
Dim fso As New FileSystemObject
Dim file As TextStream

Rate Checks username and Password from a text file using Filescripting.



Set file = fso.OpenTextFile(App.Path & "/user.txt", ForReading, False)

While Not file.AtEndOfStream
 If file.ReadLine = Trim(Text1.Text) & ";" & Trim(Text2.Text) Then
  MsgBox "Login sucessful"
  Exit Sub
 End If
Wend
 
MsgBox "Login Fail"
file.Close
End Sub

Private Sub Command2_Click()

Set file = fso.OpenTextFile(App.Path & "/user.txt", ForAppending, True, TristateUseDefault)

file.WriteLine vbCrLf & Text3.Text & ";" & Text4.Text

MsgBox "Login Created"
End Sub


Download this snippet    Add to My Saved Code

Checks username and Password from a text file using Filescripting. Comments

No comments have been posted about Checks username and Password from a text file using Filescripting.. Why not be the first to post a comment about Checks username and Password from a text file using Filescripting..

Post your comment

Subject:
Message:
0/1000 characters