Search related threads. Remove From My Forums. Answered by:. Archived Forums V. Visual Basic Language. Not for VB6 0 0. Sign in to vote. Hi, I am using Visual studio and VB. Return My. Name End If End Function. What is 'custom authentication'? Is it like smart card login? I have another question : How can I retrieve the logon username, aka the username which has been used to open the session.
If impersonation is used or application has been 'run as', the username does not match the real username of the session logon. Is there any API which allow to query WinLogon to retrieve the username of the currently active session no terminal server must be supported with multiple active sessions. Deutschland Deutsch. Thanks in advance for any reply. Cheers, FatEric. Look at the code in the first post. Why don't you just use a config file text,XML,encrypted and store the specific user information there.
If you want to protect your program with a user name and password you are more likely than not going to have to create your own login database. I have this scenerio for a program I wrote. The users log into Windows.. Hi csutton, That is indeed what I wanted to do. Each 2 months we have to change our password for windows, so that would mean the I had the change each 2 months a database with login and password.
I you could pass me that code, it would be very nice. Than I only have to create a database with the users would could use the program, and the see if the windows password and login match the ones giving into my prog.
Maybe you could sent them to my email too? Thanks in advance Here is the function DirectorySearcher Entry Searcher. Thanks csutton, I will try it tomorrow at work. But I already tried to work with Directory services, but I didn't seem to find them in any library. Could you tell me where I could find it? I'm new to vb. Thanks, FatEric. DirectoryServices - Sometimes the answer to your question is the hack that works. Guys, I tried to import System. DirectoryServices Imports System. So have a look at VB application source code for the command button.
Now test your visual basic password form , that should be perfect. As you can see, it is straightforward to make a login form by coding in VB. I am sure there are many ways to use VB. NET codes for the log in form.
0コメント