Freddie,
This is what I do in most of my applications:
1. Maintain a Users table that includes fields for login name and
encrypted password.
2. Display a login form that prompts for user name and password.
3. In the user name fields, display, as a default the Windows login name, using SYS(0), as per JRB-Bldr's suggestion. The user can either leave this field as it is, or type in a different user name.
4. After the user has logged in, search the user table for a record that has the user-entered login name and the encrypted version of the password. If the search succeeds, grant the user entry to the application.
To handle the encryption, I use VFP's SYS(2007) function. This isn't encryption in the usual sense of the word, but it serves the same function. The point is that it is a one-way process. You can easily derive the encrypted password from the plain text, but there's no easy way to go in the other direction. The advantage is that you never store or transmit the actual password.
When setting up a new user, the admin person can either let the user log in with their Windows login name (in which case, the user won't need to enter the name at login time) or any other name they choose.
However, they will always need to assign a password. I don't know any way of using the Windows password as a default, nor do I think it's desirable. A user's Windows password is not necessarily treated with strict security (in fact, it's not even mandatory to have such a password) and defaulting to the Windows password doesn't provide any extra convenience, given that you have to type in the password in any case.
I hope this of some use to you.
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
Visual FoxPro tips, advice, training, consultancy
Custom software for your business