User and Password Login using Windows Local Users and Passwords

I clearly am not sure as to what I am doing.  

I would like the Login form User and Password for my VB.NET 2005 application to be the same as the local XP workstations User and Password.  I am not sure exactly how to apply what I've read as most of the examples are for networked systems.

What are my options?

What do I do within the ok_click event?

Thank you in advance!
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Hi, did you did try the LogonUser-function? It's for local computer logon.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
I'm not sure I understand what you need. When you open Login form, you want current user name (as you are logged in Win XP) is in your text box for user name? Or you want to open Login form which is exactly the same as Win XP login form is?
jafinch3700Author Commented:
Dengia, I think vb_jonas asnwered my questions as I was not sure what approach to take as most examples I read used AD and LDAP.   The Win32 API looks like a new route that I breifly read about in an older VB6 book I have.

I still need to test and see if the solution is functional.  

Since, you asked, how would you go about opening the Win XP login form and using for another application?  Also, how does the Win XP login form validate username and login?
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

jafinch3700Author Commented:
Hi and Thank you both for your responses by the way!

Would anyone know of a good example of a flow chart that shows the different ways users are validated on 2000/XP/Vista systems?

Thanks again!
Hi, yes I asked if you need to open Win XP login form, but I really don't know how to open it and use it in another application. I guess it validates username/pwd nearly the same way as it is shown in link vb_jonas gave you.
jafinch3700Author Commented:
Great job vb_jonas.  Exciting to see this work.
Seems like you would want to have cases or if-then-else routines with the local (Win32 API) and network (AD, LDAP,etc) validation routines for added flexibility to allow an application to use local or network authentication.  
Thank you very much!
Great, thanks!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.