Link to home
Start Free TrialLog in
Avatar of GaryBates
GaryBates

asked on

Nt User Management program

I have created a program in visual basic for getting user information and giving the option of unlocking the account and reseting the password.

I would like to store information on how many times someone has had there password changed through the program. I.e. sue wants to have her password changed the program then displays a label on how many times she had changed it.

It would also be good to be able to keep a history with dates :-)

any help would be good

Gary.
Avatar of Frog357
Frog357

You can store this with the registry using GetSetting, SaveSetting, and GetAllSettings.  You could also use INI files and then you would need more work to use the API calls for Read & Write PrivateProfileString.

For the registry approach, you might save a key for each user as in:

SaveSetting "YourAppName", "USERNAME", "ResetCount", count


The to display on an label:
label1.caption = GetSetting("YourAppName", "USERNAME", "ResetCount", count)


You could save a value for the date reset and this can be done a few different ways.
One way could be:
Name the key value ("Reset" & Count)
so you'd have keys like:
Reset1
Reset2
Reset3

And each would contain the date it was reset for the value.
Create a listbox and a for loop using the count of resets and populate the list box with each date found.

This can be done many ways but hopefully this will give you ideas to start!
One correction:
The to display on an label:
label1.caption = GetSetting("YourAppName", "USERNAME", "ResetCount", 0)

The last value in GetSetting is the default value, if it's not found it should be 0.
Avatar of GaryBates

ASKER

I would prefer to use ann INI Setting as this is more universal and not restricted to one machine.

can you explain more about this?!?!?
ASKER CERTIFIED SOLUTION
Avatar of Frog357
Frog357

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
GaryBates:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.