Looking for work? Check out our jobs area.

Get Computer Name in VB v1.0

Get Computer Name in VB v1.0

Submitted By: harikuttan78
Rating: starstarstarhalf star (Rate It)

Used one API call GetComputerName This is simple project i
declared a public function in a module and it calls in a
command button click procedure it will show your computer name
in a message box try this programme and let me know if there is
any other easy way to get computer name & server name


NOTE: Some downloads must be obtained through publishers´s site.
Do you want to get your software listed on this site? Go to our submissions area.

Screenshot

No Image

Details

File Name:
25562.zip
Product homepage:
Order page:
Languages:
Unknown
Platforms:
Unknown
Release date:
1/30/2003
License:
Unknown
Size:
4 KB
Price/Fee (US$):
Unknown
Number of downloads:
5437

Comments (5)

very good starstarstarstarstar   Posted on Monday, July 14, 2003

very good

Sweeet starstar   Posted by: Andries on Friday, July 18, 2003

This is just the link I was looking for.
A small, powerfull program...

Very good code (short and usefull) starstarstarstar   Posted on Wednesday, August 20, 2003

The code was usefull to develop an application, i was able to doit by ASP, but this application needs to run on a pc.

Thank's for the code

Example was nice, but needs improvement starstar   Posted by: Brian on Wednesday, September 24, 2003

Even with the Trim statment, the computer name will have a trailing NullChar.

This how I implemented the api call:

Public Declare Function GetComputerName Lib "kernel32" Alias _
"GetComputerNameA" (ByVal lpBuffer As String, nSize As Long) As Long

' ------------------------------
' GetCompName
' Gets the computer network name.
' ------------------------------
Private Function GetCompName() As String
Dim sBuffer As String
Dim sComputerName As String
Dim lReturn As Long
sBuffer = Space(255)
lReturn = GetComputerName(sBuffer, Len(sBuffer))
sComputerName = Left$(sBuffer, InStr(sBuffer, vbNullChar) - 1)
GetCompName = Trim$(sComputerName)
End Function

CO starstarstarstarstar   Posted by: Henry Aviles on Wednesday, October 15, 2003

Short and to the point, And i found it with the first hit on google.

Add Your Rating

(Not published)
star
starstar
starstarstar
starstarstarstar
starstarstarstarstar

corner
© 1996-2008. All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Publisher: Lars Hagelin.
bootstrapLabs Logo A bootstrapLabs project.