Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
PC name
Message
From
13/01/2003 14:35:54
Jason Dalio
Northern Interior Regional Health Board
Prince George, British Columbia, Canada
 
 
To
13/01/2003 14:29:44
Fausto Garcia
Independent Developer
Lima, Peru
General information
Forum:
Visual Basic
Category:
Other
Title:
Miscellaneous
Thread ID:
00741131
Message ID:
00741135
Views:
22
Use an API.
Declare Function GetComputerName Lib "kernel32.dll" Alias "GetComputerNameA" (ByVal lpBuffer As String, nSize As Long) As Long 

Private Sub Command1_Click()
Dim compname As String, retval As Long

   compname = Space(255)
   retval = GetComputerName(compname, 255)
   compname = Left(compname, InStr(compname, vbNullChar) - 1)
   Debug.Print compname

End Sub
Previous
Reply
Map
View

Click here to load this message in the networking platform