S
starbuck
Hi
In VB6 we used the following to get the computer name.
'Computer Name
Dim sBuffer As New String(20)
If GetComputerNameA(sBuffer, 20) <> 0 Then
ComputerName = Left(sBuffer, InStr(sBuffer, Chr(0)) - 1)
End If
If Len(ComputerName) > 10 Then ComputerName = Left(ComputerName, 10)
Can anyone advise an a good alternative in VB.NET as this function no longer
works.
Thanks in advance
In VB6 we used the following to get the computer name.
'Computer Name
Dim sBuffer As New String(20)
If GetComputerNameA(sBuffer, 20) <> 0 Then
ComputerName = Left(sBuffer, InStr(sBuffer, Chr(0)) - 1)
End If
If Len(ComputerName) > 10 Then ComputerName = Left(ComputerName, 10)
Can anyone advise an a good alternative in VB.NET as this function no longer
works.
Thanks in advance