English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I want to put a "remember me" in my log-in program, and i have a problem. I know already how to create a "remember me" within a program, but how if outside the program?? I mean, if i enter the username and passwrd; check the "remember me" and then log-in. After i log-out the program should end, or terminate; and then when i run the program again, the username should stay in the username field., because the "remember me" has left checked. How am i going to do this??
Please answer my quesion asap. Thnx!!!

2007-01-07 10:57:26 · 5 answers · asked by bill 2 in Computers & Internet Programming & Design

5 answers

If you're uncomfortable mucking around in the registry, another way is to write a small text file.

Something like this:

Dim strFilePath as String
strFilePath = App.Path & "\pwRemember.dat"

If chkRememberMe.checked = TRUE then
Open strFilePath For Output As #1
Write #1, name.text, pw.text
Close #1
End If

Then check for the .dat file on start of program:

If Exists(strFilePath)
Open strFilePath For Input As #1
Input #1, name, pw
name.text = name
End If
pw.text = pw
Close #1

note: AppPath puts the file in the same path as your application, for example C:/ProgramFiles/MyApplicationFolder

2007-01-07 14:11:33 · answer #1 · answered by rod 6 · 0 0

once you're seeking to adhere with VB yet have the desire to make a "webby" interface you will possibly be able to as nicely bounce to a VB.internet application engaged on an IIS server. Unfortunatly upgrading a VB challenge to .internet isn't fairly ordinary. some code will immediately improve once you open an previous challenge in .internet yet there'll be fairly some handbook conversion mandatory. you're greater beneficial off rebuilding the app from the floor up.

2016-10-30 07:01:36 · answer #2 · answered by gripp 4 · 0 0

Write in a piece of code that places a flag in the registry. VB includes a registry function which creates certain registry keys you can use to store data.

2007-01-07 11:01:02 · answer #3 · answered by Shawn H 6 · 1 0

"Remember Me" implies that you want to store the user name and password somewhere for later retrieval.... are you getting the hint? Pick a location - registry, ini file, xml document, morse code...whatever..

2007-01-07 12:05:25 · answer #4 · answered by averstar23 2 · 0 0

I agree with Shawn H.

Recommend using HKEY_CURRENT_USER root. Use the Software Key and create your own Key under Software.

2007-01-07 11:10:41 · answer #5 · answered by Dave W 1 · 1 0

fedest.com, questions and answers