Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I get my computer name using VB? 1

Status
Not open for further replies.

ctau

IS-IT--Management
Feb 8, 2000
34
US
I know this should be an easy one but I cant find it anywhere. I need to get my network machine name in my VB program.


Thanks,
ctau
 
Win32 API. If you've never used it before, the API Text viewer that comes with VB is a neat tool. Through this declaration in somewhere globally visible and have fun

Declare Function GetComputerName Lib "kernel32" Alias "GetComputerNameA" (ByVal lpBuffer As String, nSize As Long) As Long
 
Thanks, that was a huge help. I haven't used the API viewer, but I guess I should start using it. I think that the word API just scares me a bit.

ctau
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top