srilatha26 Posted February 10, 2005 Posted February 10, 2005 Hi, Is there a way of finding the domain names associated with the system using VB.Net? Sample code or appropriate links appreciated. Thanks ! Quote
stustarz Posted February 10, 2005 Posted February 10, 2005 Using: system.environment.UserDomainName will return the network domain, you could place it in a label or something like this: Me.Label1.Text = System.Environment.UserDomainName.ToString Quote Visit: VBSourceSeek - The VB.NET sourcecode library "A mere friend will agree with you, but a real friend will argue."
srilatha26 Posted February 10, 2005 Author Posted February 10, 2005 Hi, Thanks for the response. system.environment.UserDomainName gives the domain the current user has logged into. What Iam looking for is the list of all domains in the environment. We want to display the list of domains in a drop down list, so the user can choose one of the domains that he wants to log on to. Quote
*Gurus* Derek Stone Posted February 10, 2005 *Gurus* Posted February 10, 2005 Make sure to use the CredUIPromptForCredentials Win32 API is if you're prompting the user to enter credentials. Quote Posting Guidelines
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.