CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Mar 2000
    Location
    Arizona, USA
    Posts
    493

    How To Get Computer Name And user Name

    How can I get the computer name and the user name of the loged in user on a workstation from VB?
    Thanks For Any Help!!!

    Kris
    Software Engineer
    Phoenix,AZ
    Kris
    Software Engineer
    Phoenix, AZ USA

  2. #2
    Join Date
    Jul 1999
    Posts
    84

    Re: How To Get Computer Name And user Name

    Hello,

    You can get the user name by using the winsock controls Local Host Name property.

    Thanks
    Harini

  3. #3
    Join Date
    Mar 2000
    Location
    Arizona, USA
    Posts
    493

    Re: How To Get Computer Name And user Name

    Well That Actually Returns The PC Name. But I am Not Using Winsock In This App So I Would Hate
    To Use It Just For That. I Know It Can Be Done With API's But I Don't Know How.

    Kris
    Software Engineer
    Phoenix,AZ
    Kris
    Software Engineer
    Phoenix, AZ USA

  4. #4
    Join Date
    Jul 1999
    Posts
    84

    Re: How To Get Computer Name And user Name

    Hello,

    For getting the user name use GetUserName API.

    Thanks
    Harini

  5. #5
    Join Date
    Jul 1999
    Posts
    84

    Re: How To Get Computer Name And user Name

    Hello,

    Also you can use GetComputerName API for getting the computer's name

    Thanks
    Harini

  6. #6
    Join Date
    Mar 2000
    Location
    Arizona, USA
    Posts
    493

    Re: How To Get Computer Name And user Name

    Thanks!!!

    Kris
    Software Engineer
    Phoenix,AZ
    Kris
    Software Engineer
    Phoenix, AZ USA

  7. #7
    Join Date
    Jun 2001
    Location
    India
    Posts
    6

    Pass information

    Hello,

    How can I pass an information from one .exe file with another .exe file.

    Ex: In one .exe file if I select a picture name(combo box), it should open another .exe file and display that particular picture.(pic box).


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured