textbox save it as .txt file
If you need help with a project or need to know how to do something specific in VB.NET then please ask your questions in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
7 posts
Page 1 of 1
ok ! this might be hard but i need to know :(, i already see many tutorials for making notepad save/open feature but the program im making doesnt need that with dialogs i mean
i just want people to press Save it will save texbox1.text in a saved1.txt in C:/test/
and then they press open it will open saved1.txt from C:/test/saved1.txt into textbox1.text
if this is possible without dialog boxes tell me
loove;
i just want people to press Save it will save texbox1.text in a saved1.txt in C:/test/
and then they press open it will open saved1.txt from C:/test/saved1.txt into textbox1.text
if this is possible without dialog boxes tell me

hello #troop
you can always try it like this:
'save
you can always try it like this:
'save
Code: Select all
'open
Dim sr As New System.IO.StreamWriter("c:\test\saved1.txt")
Dim s As String = TextBox1.Text
sr.Write(s)
sr.Close()
Code: Select all
Dim sr As New System.IO.StreamReader("c:\test\saved1.txt")
TextBox1.Text= sr.ReadToEnd
sr.Close()
visit us on:
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
works 
after watching many tutorials my brother told me to create a login system without looking in youtube, he asked me to do it with those checks, Check username chars to be + 2 and password match etc
do u like my codes guys


after watching many tutorials my brother told me to create a login system without looking in youtube, he asked me to do it with those checks, Check username chars to be + 2 and password match etc
do u like my codes guys

Code: Select all
sorry i used dummy code for saving Try
If My.Computer.FileSystem.DirectoryExists(Loc) Then
Else
My.Computer.FileSystem.CreateDirectory(Loc & "\accounts\")
End If
If txtBox3.Text.Length < 2 Then
MsgBox("Your username should be more than 2 characters!")
Else
If txtBox4.Text = Nothing Then
MsgBox("Please enter a password")
Else
Dim accLoc As String = Loc & "\accounts\" & txtBox3.Text & "\password.txt"
If My.Computer.FileSystem.DirectoryExists(accLoc) Then
MsgBox("Account already exist")
Else
If txtBox4.Text = txtBox5.Text Then
My.Computer.FileSystem.CreateDirectory(Loc & "\accounts\" & txtBox3.Text & "\")
Dim sr As New System.IO.StreamWriter(accLoc)
Dim s As String = txtBox4.Text
sr.Write(s)
sr.Close()
MsgBox("Account successfully created, we will auto login you!")
txtBox1.Text = txtBox3.Text
txtBox2.Text = txtBox4.Text
txtBox3.Clear() : txtBox4.Clear() : txtBox5.Clear()
btnLog.PerformClick()
Else
MsgBox("Please comfirm your password")
End If
End If
End If
End If
Catch ex As Exception
MsgBox(ErrorToString)
End Try

It's a nice way of learning, but just don't use it to store any actual passwords :lol:
Plain text files are the least secure method for keeping confidential information.
Plain text files are the least secure method for keeping confidential information.
indeed they are not good, ok for limited information but not the likes of passwords or even usernames.
when it comes to storing say save username into any of my applications i create a hex key and store it in the registry.
passwords are always base64 encrypted to my mssql server's and as an extra security feature depending on the application i write i also add a usb key so you have to have the usb device plugged in or it wont even get to the login screen :d
when it comes to storing say save username into any of my applications i create a hex key and store it in the registry.
passwords are always base64 encrypted to my mssql server's and as an extra security feature depending on the application i write i also add a usb key so you have to have the usb device plugged in or it wont even get to the login screen :d
Dualz
Co-Owner TADStools Network
Co-Owner TADStools Network
- Microsoft Systems Engineer
Microsoft Software Engineer
Cisco Certified Network Engineer
Programming Languages: Delphi, Python, Cron, PHP, HTML, ASP.Net, Cold Fustion, VB.net, C, C++, C#, XAML, IOS, Android, Java, ASM
im making a simple game i found a tutorial on here, i will tell ueverything about it later but i mean this is not a real huge app its ok if they see passwords ;p
7 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023