| | |
Creating a Login Text file
Please support our VB.NET advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Aug 2008
Posts: 126
Reputation:
Solved Threads: 1
i want to create a login text file at each login , that will be stored in system folder that can be viewed but not modified....so that the person who logged last can be traced...
here is my code : Is the code correct ??? if not what are the modifications ? i get a file created but am some how not convinced....
FILENAME = "LOGIN.TXT"
FileOpen(1, "LOGIN.TXT", OpenMode.Append)
WriteLine(1, username, password, role)
FileClose(1)
cya
Rohan
here is my code : Is the code correct ??? if not what are the modifications ? i get a file created but am some how not convinced....
FILENAME = "LOGIN.TXT"
FileOpen(1, "LOGIN.TXT", OpenMode.Append)
WriteLine(1, username, password, role)
FileClose(1)
cya
Rohan
•
•
Join Date: Aug 2008
Posts: 16
Reputation:
Solved Threads: 0
So you would like to use the "login.txt" file as the place where the username and password are stored?
That's not very good login system, anyone could search the computer for login (which is quite obvious). Try renaming the file to something completely random i.e. "4ty47rhegi.txt"
As far as the code goes you used
My amendment's for you are simply follow this person's tutorial Here. Its so simple and goes right into depth, I take no credit and pass it all onto him
That's not very good login system, anyone could search the computer for login (which is quite obvious). Try renaming the file to something completely random i.e. "4ty47rhegi.txt"
As far as the code goes you used
FILENAME = "LOGIN.TXT" FileOpen(1, "LOGIN.TXT", OpenMode.Append) WriteLine(1, username, password, role) FileClose(1)
My amendment's for you are simply follow this person's tutorial Here. Its so simple and goes right into depth, I take no credit and pass it all onto him
•
•
Join Date: Aug 2008
Posts: 126
Reputation:
Solved Threads: 1
thanks but can i get a proper code for d same ? i am unable to watch video properly prob. due to my slow connection....can u plz help me out soon ! cya, wating for ur reply
•
•
•
•
So you would like to use the "login.txt" file as the place where the username and password are stored?
That's not very good login system, anyone could search the computer for login (which is quite obvious). Try renaming the file to something completely random i.e. "4ty47rhegi.txt"
As far as the code goes you used
FILENAME = "LOGIN.TXT" FileOpen(1, "LOGIN.TXT", OpenMode.Append) WriteLine(1, username, password, role) FileClose(1)
My amendment's for you are simply follow this person's tutorial Here. Its so simple and goes right into depth, I take no credit and pass it all onto him
•
•
Join Date: Aug 2008
Posts: 16
Reputation:
Solved Threads: 0
•
•
•
•
thanks but can i get a proper code for d same ? i am unable to watch video properly prob. due to my slow connection....can u plz help me out soon ! cya, wating for ur reply
Right.
I will write the code for you now, ok, so
textbox1 is username field, textbox2 is password
This is the code for the button (Login button)
Dim password As String
Dim username As String
password = "yourpassword"
username = "yourusername"
If TextBox1.Text = username And textbox2.text = password Then
form2.show()
Me.Close()
ElseIf TextBox1.Text = username = False Then
MsgBox("Wrong username", MsgBoxStyle.Critical)
ElseIf textbox2.text = password = False Then
MsgBox("Wrong password", MsgBoxStyle.Critical)
ElseIf TextBox1.Text = username = False And textbox2.text = password = False Then
MsgBox("Wrong username and password", MsgBoxStyle.Critical)
End Ifyourpassword = Should be changed to your password
form2.show = The form you want to show when the correct username and password are entered
Sorry for the late reply, any probs/questions let me know
Also let me know if it works as well lol
Thanks,
Luke
also you could have a change login button which would work by overwriting the other login
Code for change login button:
username = TextBox1.Text password = textbox2.text
Last edited by lukechris; Sep 7th, 2008 at 1:04 pm.
•
•
Join Date: Aug 2008
Posts: 126
Reputation:
Solved Threads: 1
thanks a lot for ur response....
Btw...do u hv ne info about listview option in vb.net.... ?? i want to create attendance form
in which when i select a particular date all admission id , names should be listed and then besides them there should be a check box where in i can check/uncheck depending upon present or absent ? how to do it ?? is list view option gud or check box in datagrid ??? i dont know about both of dem ?? can u help me out ?? plzzz
Btw...do u hv ne info about listview option in vb.net.... ?? i want to create attendance form
in which when i select a particular date all admission id , names should be listed and then besides them there should be a check box where in i can check/uncheck depending upon present or absent ? how to do it ?? is list view option gud or check box in datagrid ??? i dont know about both of dem ?? can u help me out ?? plzzz
•
•
•
•
Hi sorry your waiting on my reply
Right.
I will write the code for you now, ok, so
textbox1 is username field, textbox2 is password
This is the code for the button (Login button)
yourusername = Should be changed to your usernameDim password As String Dim username As String password = "yourpassword" username = "yourusername" If TextBox1.Text = username And textbox2.text = password Then form2.show() Me.Close() ElseIf TextBox1.Text = username = False Then MsgBox("Wrong username", MsgBoxStyle.Critical) ElseIf textbox2.text = password = False Then MsgBox("Wrong password", MsgBoxStyle.Critical) ElseIf TextBox1.Text = username = False And textbox2.text = password = False Then MsgBox("Wrong username and password", MsgBoxStyle.Critical) End If
yourpassword = Should be changed to your password
form2.show = The form you want to show when the correct username and password are entered
Sorry for the late reply, any probs/questions let me know
Also let me know if it works as well lol
Thanks,
Luke
also you could have a change login button which would work by overwriting the other login
Code for change login button:
username = TextBox1.Text password = textbox2.text
•
•
Join Date: Aug 2008
Posts: 126
Reputation:
Solved Threads: 1
hey but is code is not about creating a login text file...i mean at each login i want a text file to be created in the system...which admin can check out....do u hv ne idea about i...btw i hve written code ias above (check above) is correct ??
cya
Reply sn,
Rohan
cya
Reply sn,
Rohan
•
•
•
•
Hi sorry your waiting on my reply
Right.
I will write the code for you now, ok, so
textbox1 is username field, textbox2 is password
This is the code for the button (Login button)
yourusername = Should be changed to your usernameDim password As String Dim username As String password = "yourpassword" username = "yourusername" If TextBox1.Text = username And textbox2.text = password Then form2.show() Me.Close() ElseIf TextBox1.Text = username = False Then MsgBox("Wrong username", MsgBoxStyle.Critical) ElseIf textbox2.text = password = False Then MsgBox("Wrong password", MsgBoxStyle.Critical) ElseIf TextBox1.Text = username = False And textbox2.text = password = False Then MsgBox("Wrong username and password", MsgBoxStyle.Critical) End If
yourpassword = Should be changed to your password
form2.show = The form you want to show when the correct username and password are entered
Sorry for the late reply, any probs/questions let me know
Also let me know if it works as well lol
Thanks,
Luke
also you could have a change login button which would work by overwriting the other login
Code for change login button:
username = TextBox1.Text password = textbox2.text
![]() |
Similar Threads
- Encrypt File using User Supplied Password (VB.NET)
- Simple login (read data through txt file) (Visual Basic 4 / 5 / 6)
- Creating login screens in VB6 (Visual Basic 4 / 5 / 6)
- Please help me :"login form use drag and drop toolbox" ! (C#)
- Creating an event or an action to a button. (PHP)
- C: - reading in from text (C++)
- undefined variable although register_session done (PHP)
- Facing the problem on "RedirectFromLoginPage" (VB.NET)
- Error Creating Folder message during installation (OS X)
Other Threads in the VB.NET Forum
- Previous Thread: Image stored in sqlserver
- Next Thread: paint w/ vb.net
Views: 1764 | Replies: 5
| Thread Tools | Search this Thread |
Tag cloud for VB.NET
.net .net2008 2005 2008 access account application array arrays basic bing button buttons c# center check checkbox code convert crystalreport data database datagrid datagridview date design designer dissertation dissertations dropdownlist excel fade file-dialog filter ftp generatetags google gridview hardcopy images inline input insert installer intel internet listview mobile monitor net networking objects output panel passingparameters picturebox port position print printing problem read remove save searchbox searchvb.net select serial shutdown soap sorting studio survey table tcp temperature text textbox time timer timespan toolbox trim update user validation vb vb.net vb.netformclosing()eventpictureboxmessagebox vb2008 vbnet visual visualbasic visualbasic.net visualstudio2008 web webbrowser winforms wpf year





