none
usuario RRS feed

  • Pergunta

  • oi galera tenho este codigo a baixo que mostra nome do pc e do usuario mais eu so quero que aparca o do usuario como faço em vb.net obrigado a todos 

     tt.text = My.User.Name

    aparece a sim pc\pjoao quero que so apareça o pjoao

    sexta-feira, 5 de dezembro de 2014 03:27

Respostas

  • Environment.UserName

    Infos:

    "Public Shared ReadOnly Property UserName As String
         Member of System.Environment
    Summary:
    Gets the user name of the person who is currently logged on to the Windows operating system.

    Return Values:
    The user name of the person who is logged on to Windows.

    Public NotInheritable Class Environment
    Inherits System.Object
    Member of System
    Summary:
    Provides information about, and means to manipulate, the current environment and platform. This class cannot be inherited."



    Microsoft Technology Associate (MTA)


    • Editado Eduardo xUni sexta-feira, 5 de dezembro de 2014 10:11
    • Marcado como Resposta joão pjoao1578 sexta-feira, 5 de dezembro de 2014 16:21
    sexta-feira, 5 de dezembro de 2014 10:07

Todas as Respostas

  • Environment.UserName

    Infos:

    "Public Shared ReadOnly Property UserName As String
         Member of System.Environment
    Summary:
    Gets the user name of the person who is currently logged on to the Windows operating system.

    Return Values:
    The user name of the person who is logged on to Windows.

    Public NotInheritable Class Environment
    Inherits System.Object
    Member of System
    Summary:
    Provides information about, and means to manipulate, the current environment and platform. This class cannot be inherited."



    Microsoft Technology Associate (MTA)


    • Editado Eduardo xUni sexta-feira, 5 de dezembro de 2014 10:11
    • Marcado como Resposta joão pjoao1578 sexta-feira, 5 de dezembro de 2014 16:21
    sexta-feira, 5 de dezembro de 2014 10:07
  • muito obrigado amigo deu certo aqui like
    sexta-feira, 5 de dezembro de 2014 16:21