Re: VB 2005 logon form



So, on the logon form I want it to grab the users ntlogon, how do I do
this in vb2005?
Andrew Watt [MVP] wrote:
On 5 Jul 2006 07:23:40 -0700, "confused" <isabelellis@xxxxxxxxxxx>
wrote:

In vb6 I used the following code:
' Helper object
Set oNet = CreateObject("WScript.Network")
' Get the user name.
sUser = oNet.UserName
Select Case txtUserName.Text
Case 2582
CurrentUser = "Tester"
Case Else
CurrentUser = sUser
End Select

This code does not work in VB 2005, why not?
What needs to be changed?

It doesn't work because VB2005 uses the .NET Framework.

Andrew Watt MVP

.



Relevant Pages

  • Re: [PS] Error in Help for rename-item?
    ... Rename-Item: Cannot rename because the target specified is not a path. ... Andrew Watt MVP ... delete a folder that is open in another explorer, that will close the other explorer, would you want that for PowerShell? ...
    (microsoft.public.windows.server.scripting)
  • Re: microsoft.private.sqlserver2005 user group?
    ... The login information for the microsoft.private.sqlserver2005.* stack ... >Andrew Watt ... >MVP - InfoPath ...
    (microsoft.public.sqlserver.setup)
  • Re: Report Services
    ... When I tried to reinstall the TechEd 2005 SQL Server 2005 back ... >> uninstall problem. ... >> Andrew Watt ... >> MVP - InfoPath ...
    (microsoft.public.sqlserver.setup)
  • Re: PowerShell
    ... which is ok if the GUI app exits before the end of that period. ... Andrew Watt MVP ... PowerShell questions on microsoft.public.windows.powershell. ...
    (microsoft.public.windows.server.scripting)
  • Re: [MSH] The new name is: Windows Power Shell
    ... Andrew Watt [MVP] wrote: ... full name "Windows Power Shell" probably because they need to make it stick. ... The Monad name as well as the acronym MSH will be gone. ...
    (microsoft.public.windows.server.scripting)

Loading