Question[Help]A Question...

Posts 1–15 of 17 · Page 1 of 2
[Help]A Question...
Ok, I made this program and you have to enter a password to get into it.

But what I want is, when i type in the password, once i hit submit, i want it to save the text in textbox1 [secretly, with out any1 knowing] into a text doc in my C:\ drive, like C:\text.txt

Thanks for the help.

Ive tried

Code:
write(textbox1.text, "C:\text.txt")
[and the other way around] still dosnt work.
Add the following code to the hit button:

Code:
My.Computer.FileSystem.WriteAllText("C:\text.txt",textbox1.text,False)
Quote Originally Posted by NextGen1 View Post
Yeah, This doesn't seem to be a good idea.

What are you doing this for?
Nothing that im posting. My own program that tells me my id's and passwords, im doing this so my bro wont get into it, and if he tries, ill know

Quote Originally Posted by Hassan View Post
Add the following code to the hit button:

Code:
My.Computer.FileSystem.WriteAllText("C:\text.txt",textbox1.text,False)
This works, but it replaces the one thats currently there..
this can't have a really positive ending..
Make sure you encrypt it somehow...
Yeah, This doesn't seem to be a good idea.

What are you doing this for?
I'd just save a md5 string of the entered password in mysettings. You cannot "decrypt" md5. You will have to check it like...

If md5string(txtpassword.text) = my.settings.password then
msgbox("Correct pw ")
else
msgbox("You have just failed.")
end if
My.Computer.FileSystem.WriteAllText("C:\text.txt", textbox1.text,True)

Intellisense ftw.
Quote Originally Posted by Blubb1337 View Post
My.Computer.FileSystem.WriteAllText("C:\text.txt", textbox1.text,True)

Intellisense ftw.
Hmm.. but it puts it right next to it, maybe a space or like a new line?
easy way

[php]
My.Computer.FileSystem.WriteAllText("C:\text.txt", TextBox1.Text & " ", True)
[/php]
would this work for a new line? (Haven't tested it so don't hold me to it)

[php]
My.Computer.FileSystem.WriteAllText("C:\Log.txt", TextBox1.Text & vbNewLine, True)
[/php]

?

Or you could use StreamWrite
Quote Originally Posted by Jason View Post
would this work for a new line? (Haven't tested it so don't hold me to it)

[php]
My.Computer.FileSystem.WriteAllText("C:\Log.txt", TextBox1.Text & vbNewLine, True)
[/php]

?

Or you could use StreamWrite
Yup, that works
Quote Originally Posted by qddW$#%^jtyjtyj View Post
Nextgen1 pwned us xD
Where ?
[php]Using write as new io.streamwriter("C:\Log.txt",true) 'true = APPEND
write.write(textbox1.text)
End using[/php]
Posts 1–15 of 17 · Page 1 of 2
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?