|
|
Title | Get the computer's name |
Keywords | computer name, GetComputerName |
Categories | Windows, Tips and Tricks, API |
|
|
Use the GetComputerName API function.
|
|
Private Sub Form_Load()
Dim computer_name As String
Dim length As Long
computer_name = Space$(256)
length = Len(computer_name)
GetComputerName computer_name, length
computer_name = Left$(computer_name, length)
lblComputerName.Caption = "[" & computer_name & "]"
End Sub
|
|
|
|
|
|